welcome on board new 'Sparkle' theme and also welcome on board BNoiZe as theme maintainer (creater of Sparkle theme)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
39
templates/Sparkle/admin/traffic/index.tpl
vendored
Normal file
39
templates/Sparkle/admin/traffic/index.tpl
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
$header
|
||||
<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$.tablesorter.addParser( {
|
||||
id: 'filesize',
|
||||
is: function(s) {
|
||||
return s.match( new RegExp( /[0-9]+(\.[0-9]+)?\ (KiB|B|GiB|MiB|TiB)/ ) );
|
||||
},
|
||||
format: function(s) {
|
||||
var suf = s.match( new RegExp( /(KiB|B|GiB|MiB|TiB)/) )[1];
|
||||
var num = parseFloat( s.match( new RegExp( /^[0-9]+(\.[0-9]+)?/ ) )[0] );
|
||||
switch( suf ) {
|
||||
case 'B':
|
||||
return num;
|
||||
case 'KiB':
|
||||
return num * 1024;
|
||||
case 'MiB':
|
||||
return num * 1024 * 1024;
|
||||
case 'GiB':
|
||||
return num * 1024 * 1024 * 1024;
|
||||
case 'TiB':
|
||||
return num * 1024 * 1024 * 1024 * 1024;
|
||||
}
|
||||
},
|
||||
type: 'numeric'
|
||||
});
|
||||
</script>
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<img src="templates/{$theme}/assets/img/icons/traffic_big.png" alt="{$lng['admin']['traffic']}" /> {$lng['admin']['traffic']}
|
||||
</h2>
|
||||
</header>
|
||||
{$stats_tables}
|
||||
</article>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
$footer
|
||||
61
templates/Sparkle/admin/traffic/index_table.tpl
vendored
Normal file
61
templates/Sparkle/admin/traffic/index_table.tpl
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
<h3>{$lng['traffic']['trafficoverview']} {$overview['type']} {$overview['year']}</h3>
|
||||
<table class="bradiusodd" id="stats{$overview['year']}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$overview['type']}</th>
|
||||
<th>{$lng['traffic']['months']['jan']}</td>
|
||||
<th>{$lng['traffic']['months']['feb']}</td>
|
||||
<th>{$lng['traffic']['months']['mar']}</td>
|
||||
<th>{$lng['traffic']['months']['apr']}</td>
|
||||
<th>{$lng['traffic']['months']['may']}</td>
|
||||
<th>{$lng['traffic']['months']['jun']}</td>
|
||||
<th>{$lng['traffic']['months']['jul']}</td>
|
||||
<th>{$lng['traffic']['months']['aug']}</td>
|
||||
<th>{$lng['traffic']['months']['sep']}</td>
|
||||
<th>{$lng['traffic']['months']['oct']}</td>
|
||||
<th>{$lng['traffic']['months']['nov']}</td>
|
||||
<th>{$lng['traffic']['months']['dec']}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{$domain_list}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{$total_list}
|
||||
</tfoot>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
var myTextExtraction = function(node)
|
||||
{
|
||||
// extract data from markup and return it
|
||||
if(node.innerHTML != '-') {
|
||||
return 1 + node.innerHTML.substr(0,node.innerHTML.length);
|
||||
} else {
|
||||
return '0 B';
|
||||
}
|
||||
}
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#stats{$overview['year']}").tablesorter( {
|
||||
textExtraction: myTextExtraction,
|
||||
headers: {
|
||||
1: {sorter: 'filesize'},
|
||||
2: {sorter: 'filesize'},
|
||||
3: {sorter: 'filesize'},
|
||||
4: {sorter: 'filesize'},
|
||||
5: {sorter: 'filesize'},
|
||||
6: {sorter: 'filesize'},
|
||||
7: {sorter: 'filesize'},
|
||||
8: {sorter: 'filesize'},
|
||||
9: {sorter: 'filesize'},
|
||||
10: {sorter: 'filesize'},
|
||||
11: {sorter: 'filesize'},
|
||||
12: {sorter: 'filesize'}
|
||||
},
|
||||
});
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
15
templates/Sparkle/admin/traffic/index_table_row.tpl
vendored
Normal file
15
templates/Sparkle/admin/traffic/index_table_row.tpl
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<tr>
|
||||
<td>{$virtual_host['name']}<if $customerview == 1> <a href="{$linker->getLink(array('section' => 'traffic', 'page' => $page, 'action' => 'su', 'id' => $virtual_host['customerid']))}" rel="external">[{$lng['traffic']['details']}]</a></if></td>
|
||||
<td style="text-align:right; font-size:10px;">{$virtual_host['jan']}</td>
|
||||
<td style="text-align:right; font-size:10px;">{$virtual_host['feb']}</td>
|
||||
<td style="text-align:right; font-size:10px;">{$virtual_host['mar']}</td>
|
||||
<td style="text-align:right; font-size:10px;">{$virtual_host['apr']}</td>
|
||||
<td style="text-align:right; font-size:10px;">{$virtual_host['may']}</td>
|
||||
<td style="text-align:right; font-size:10px;">{$virtual_host['jun']}</td>
|
||||
<td style="text-align:right; font-size:10px;">{$virtual_host['jul']}</td>
|
||||
<td style="text-align:right; font-size:10px;">{$virtual_host['aug']}</td>
|
||||
<td style="text-align:right; font-size:10px;">{$virtual_host['sep']}</td>
|
||||
<td style="text-align:right; font-size:10px;">{$virtual_host['oct']}</td>
|
||||
<td style="text-align:right; font-size:10px;">{$virtual_host['nov']}</td>
|
||||
<td style="text-align:right; font-size:10px;">{$virtual_host['dec']}</td>
|
||||
</tr>
|
||||
Reference in New Issue
Block a user