From: Davide Franco Date: Mon, 31 Jan 2011 16:53:14 +0000 (+0100) Subject: bacula-web: Enhanced pools and volume page X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e72734faae318b19fed76d4667bb9ca15ba4034f;p=bacula%2Fbacula bacula-web: Enhanced pools and volume page - Different background for odd and even lines in pools and volumes page --- diff --git a/gui/bacula-web/bweb.inc.php b/gui/bacula-web/bweb.inc.php index ba2685e5d1..8e2c68ec5b 100644 --- a/gui/bacula-web/bweb.inc.php +++ b/gui/bacula-web/bweb.inc.php @@ -327,12 +327,16 @@ class Bweb extends DB { } // Media used bytes in a human format $media['volbytes'] = $this->human_file_size( $media['volbytes'] ); - //echo "volume " . $media['volumename'] . 'vol bytes' .$media['volbytes'] . '
'; } 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); } diff --git a/gui/bacula-web/templates/pools.tpl b/gui/bacula-web/templates/pools.tpl index db836ea471..e2932ff042 100644 --- a/gui/bacula-web/templates/pools.tpl +++ b/gui/bacula-web/templates/pools.tpl @@ -41,12 +41,12 @@ {foreach from=$pool item=volume} - - - - - - + + + + + + {foreachelse}
{$volume.volumename}{$volume.volbytes}{$volume.mediatype}{$volume.expire}{$volume.lastwritten}{$volume.volstatus}{$volume.volumename}{$volume.volbytes}{$volume.mediatype}{$volume.expire}{$volume.lastwritten}{$volume.volstatus}