}
// Media used bytes in a human format
$media['volbytes'] = $this->human_file_size( $media['volbytes'] );
- //echo "volume " . $media['volumename'] . 'vol bytes' .$media['volbytes'] . '<br />';
} else {
$media['lastwritten'] = "N/A";
$media['expire'] = "N/A";
$media['volbytes'] = "0 KB";
}
+
+ // Odd or even row
+ if( count( $volumes[ $pool['name'] ] ) % 2)
+ $media['class'] = 'odd';
+
// Add the media in pool array
array_push( $volumes[ $pool['name']], $media);
}
<table class="list" border="0">
{foreach from=$pool item=volume}
<tr>
- <td width="120">{$volume.volumename}</td>
- <td width="120">{$volume.volbytes}</td>
- <td width="120">{$volume.mediatype}</td>
- <td width="140">{$volume.expire}</td>
- <td width="140">{$volume.lastwritten}</td>
- <td>{$volume.volstatus}</td>
+ <td width="120" class="{$volume.class}">{$volume.volumename}</td>
+ <td width="120" class="{$volume.class}">{$volume.volbytes}</td>
+ <td width="120" class="{$volume.class}">{$volume.mediatype}</td>
+ <td width="140" class="{$volume.class}">{$volume.expire}</td>
+ <td width="140" class="{$volume.class}">{$volume.lastwritten}</td>
+ <td class="{$volume.class}">{$volume.volstatus}</td>
</tr>
{foreachelse}
<tr>