title = $model->text; $this->params['breadcrumbs'][] = ['text' => 'Опросы', 'url' =>'/inquirer']; $url = '/inquirer/'.$model->id; Yii::$app->og->title = $model->text; Yii::$app->og->description = 'Опрос: '.$model->text; Yii::$app->og->canonical = $url; \Yii::$app->og->og_url = $url; \Yii::$app->og->og_type = "article"; \Yii::$app->og->og_title = htmlspecialchars(Yii::$app->og->title); \Yii::$app->og->og_description = Yii::$app->og->description; \Yii::$app->og->dtpub = date( "r", strtotime( $model->dt_pub ) ); \Yii::$app->og->og_image = "/img/amic-logo.svg"; $do = $model->getPart(); ?>
render("/layouts/breadcrumbs")?>

Опрос: text?>

show == 'N' || $do ){ $answers = $model->getAnswers(); $sum = 0; foreach($answers as $item){ $sum += $item->count; } foreach($answers as $item){ $percent = ($sum)?round($item->count/$sum*100):0; ?>

text?>

%
$model->id, 'model'=>$model]); }