Add some styling to the version number in the footer.

If there is an upgrade available, the label-info (blue) class is
applied.
If there is not an upgrade avaiable, the label-success (green)
class is applied.
This commit is contained in:
Kyle Johnson
2013-09-13 09:07:19 -04:00
parent b2ab1cea09
commit 16994dbdb2
2 changed files with 8 additions and 2 deletions

View File

@@ -71,9 +71,15 @@ class AppController extends Controller {
$this->set('daemonStatus', ('<span class="alert alert-danger">Stopped</span>'));
}
if (Configure::read('ZM_DYN_LAST_VERSION') > Configure::read('ZM_VERSION')) {
$zmVersion = '<span class="label label-info">' . Configure::read('ZM_VERSION') . '</span>';
} else {
$zmVersion = '<span class="label label-success">' . Configure::read('ZM_VERSION') . '</span>';
}
$this->set('systemLoad', $this->AppModel->getSystemLoad());
$this->set('diskSpace', $this->AppModel->getDiskSpace());
$this->set('zmVersion', Configure::read('ZM_VERSION'));
$this->set('zmVersion', $zmVersion);
}
function extractNamedParams($mandatory, $optional = array()) {

View File

@@ -79,7 +79,7 @@ $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework
<div class="container">
<p>
Configured for <?php echo $this->Html->link($zmBandwidth, array('controller' => 'Bandwidth', 'action' => 'index')); ?> bandwidth.
Version <?php echo $this->Html->link($zmVersion, array('controller' => 'Version')); ?>
Version <?php echo $this->Html->link($zmVersion, array('controller' => 'Version'), array('escape' => false)); ?>
</p>
</div>
</div>