Commit e7ff2473 authored by Florian Kaiser's avatar Florian Kaiser
Browse files

add total sums

parent 74aaa67b
......@@ -14,7 +14,7 @@
padding: 3px 7px 2px 7px;
}
#storageusage th {
#storageusage th, #storageusage tfoot td {
font-size: 1.1em;
font-weight: bold;
text-align: left;
......@@ -22,4 +22,4 @@
padding-bottom: 4px;
background-color: #888;
color: #000;
}
\ No newline at end of file
}
......@@ -11,8 +11,16 @@
</thead>
<tbody>
<?php $alt=false; ?>
<?php foreach($_['data'] as $row){ ?>
<?php
$alt=false;
$total_objects = 0;
$total_bytes = 0;
?>
<?php
foreach($_['data'] as $row){
$total_objects += $row['objects'];
$total_bytes += $row['bytes'];
?>
<tr class="<?php if ($alt=!$alt) echo 'alt';?>">
<td><?php p($row['username']); ?></td>
<td><?php p($row['objects']); ?></td>
......@@ -21,8 +29,16 @@
<td value="<?php p((int) (100 * $row['bytes'] / $row['quotavalue'])); ?>"><div class="storageusage-progress" storageusage-percent="<?php p((int) (100 * $row['bytes'] / $row['quotavalue'])); ?>"></div></td>
</tr>
<?php } ?>
</tbody>
<tfoot>
<tr>
<td>TOTAL</td>
<td><?php p($total_objects); ?></td>
<td value="<?php p($total_bytes); ?>"><?php p($this->human_file_size($total_bytes)); ?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>
</table>
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment