echo Yii::$app->formatter->asDate($goal->done_at); ?> (<?php echo Yii::$app->formatter->asRelativeTime($goal->done_at); ?> ) </div> <? endif; ?> <? if ($goal->icon): ?> <div> <label><?php echo Yii::t('goal', 'Icon'); ?> </label> <?php echo Icon::getIconHtml($goal->icon); ?> </div> <? endif; ?> </div> </div> <div> <label><?php echo Yii::t('goal', 'Description'); ?> </label> <p><?php echo \Yii::$app->formatter->asWiki($goal->description); ?>
<div> <?php echo $form->field($model, 'to_be_done_at')->widget(DatePicker::className(), ['dateFormat' => 'php:Y-m-d']); ?> </div> <div> <?php echo $form->field($model, 'done_at')->widget(DatePicker::className(), ['dateFormat' => 'php:Y-m-d']); ?> </div> <div> <?php echo $form->field($model, 'icon')->dropDownList(['' => ''] + array_combine(Icon::getList(), Icon::getList())); ?> </div> </div> </div> <?php echo $form->field($model, 'description')->textarea(['rows' => 6]); ?> <?php echo $form->field($model, 'smart_specific')->hint(nl2br(Html::encode(\Yii::t('smart', 'specific_hint'))))->label('[SMART] ' . \Yii::t('goal', 'Smart Specific'))->textarea(['rows' => 3]); ?> <?php
/** * @var \app\models\Goal $goal */ use app\helper\Icon; use yii\helpers\Html; ?> <a href="<?php echo $goal->url(); ?> " class="list-group-item"> <? if($goal->icon): ?> <?php echo Icon::getIconHtml($goal->icon, ['class' => 'goal-list-icon list-inline']); ?> <? endif; ?> <h4 class="list-group-item-heading goal-list-item-heading <?php echo $goal->icon ? 'goal-list-content-shift' : ''; ?> "><?php echo Html::encode($goal->title); ?> </h4> <div class="list-group-item-text goal-list-item-text <?php echo $goal->icon ? 'goal-list-content-shift' : ''; ?> ">