File size: 1.41Kb
<?php
$this->pageTitle = Yii::t('Admin', 'Dashboard');
?>
<?= TbHtml::pageHeader(Yii::t('Admin', 'Dashboard'), Yii::t('Admin', 'Modules and major system info')) ?>
<div class="row-fluid">
<div class="span8">
<?php $this->widget('bootstrap.widgets.TbGridView', array(
'type' => TbHtml::GRID_TYPE_BORDERED.' '.TbHtml::GRID_TYPE_CONDENSED,
'dataProvider' => $modules_provider,
'template' => '{items}',
'columns' => array(
'id::'.Yii::t('Admin', 'Module'),
'name' => array(
'header' => Yii::t('Admin', 'Name'),
'value' => '(!empty($data["icon"]) ? TbHtml::icon($data["icon"])." ": null).CHtml::link(isset($data["label"]) ? $data["label"] : ucfirst($data["id"]), $data["url"])',
'type' => 'raw',
),
'author::'.Yii::t('Admin', 'Author'),
'description::'.Yii::t('Admin', 'Description'),
),
)); ?>
</div>
<div class="span4">
<div class="well">
<h4><?= Yii::t('Admin', 'Disk space') ?></h4>
<?php
$free_percent = (int)($free_space * 100 / $total_space);
?>
<p><?= Yii::t('Admin', 'Used {used} of {all} ({percent}%)', array('{used}' => Yii::app()->format->formatSize($total_space - $free_space), '{all}' => Yii::app()->format->formatSize($total_space), '{percent}' => 100 - $free_percent))?></p>
<?= TbHtml::progressBar(100 - $free_percent, array('color' => $free_percent < 10 ? TbHtml::PROGRESS_COLOR_DANGER : TbHtml::PROGRESS_COLOR_DEFAULT)) ?>
</div>
</div>
</div>