/** * @inheritdoc */ public function run() { $options = $this->options; Html::addCssClass($options, 'progress-group'); $label = $this->renderLabel(); $number = $this->renderNumber(); $this->progress['value'] = $this->value; $this->progress['total'] = $this->total; $progress = ProgressBar::widget($this->progress); return Html::tag('div', $label . "\n" . $number . "\n" . $progress, $options); }
/** * Format value as progress bar widget. * @param integer $value progress value * @param array $options widget options * @return string */ public function asProgressBar($value, $options = []) { $options['value'] = $value; return ProgressBar::widget($options); }
} if ($model['label'] > 50) { $color = 'bg-yellow'; } if ($model['label'] > 80) { $color = 'bg-green'; } return Html::tag('span', $model['label'] . '%', ['class' => 'badge ' . $color]); }, 'format' => 'html']]]); ?> <?php Box::end(); ?> <?php echo Tabs::widget(['items' => [['label' => 'Tab 1', 'content' => '<div>' . Check::widget(['name' => 'chk1', 'label' => 'Enable report']) . '</div><div>' . Check::widget(['name' => 'chk2', 'label' => 'Send email', 'value' => true]) . '</div>'], ['label' => 'Tab 2', 'content' => ProgressBar::widget(['style' => ProgressBar::STYLE_SUCCESS, 'value' => 30, 'vertical' => true]) . ProgressBar::widget(['style' => ProgressBar::STYLE_WARNING, 'value' => 60, 'vertical' => true]) . ProgressBarGroup::widget(['value' => 82, 'label' => 'Processing'])], ['label' => 'Tab 3', 'content' => 'Content 3...'], ['label' => 'Dropdown', 'items' => [['label' => 'Label', 'content' => '....'], ['label' => 'Label', 'content' => '....']]]]]); ?> </div> <div class="col-md-6"> <?php Box::begin(['box' => Box::BOX_PRIMARY, 'label' => 'Box 1', 'collapsable' => true, 'solid' => true]); ?> The body of the box. The body of the box. The body of the box. <?php app\widgets\Modal::begin(['toggleButton' => ['label' => 'Modal with remote content.', 'class' => 'btn btn-flat btn-success'], 'header' => '<b>Remote content</b>', 'remote' => ['modal-remote']]); ?> <p class="text-center text-capitalize">Loading...</p> <?php app\widgets\Modal::end();