getGalleryLink();
$archive = $model->getArchiveLink();
//
$sign = \frontend\components\ImageResizer::getSign(
Yii::getAlias('@frontend-web') . '/images/sign.png',
$area->getImageLink2Path(),
$model['typeItem']['color'],
$model['area_id'] . $model['type_id']
);
//
function jsString($str = '')
{
return preg_replace("/('|\"|\r?\n)/", '', $str);
}
/* $js_icons[] = '
' . $group['id'] . ': { icon: \'' . addslashes($group->getImageLink()) . '\'}';*/
$content = $this->render('parts/_popup', ['model' => $model]);
$position = str_replace('(', '', $model['coordinates']);
$position = str_replace(')', '', $position);
$position = explode(',', $position);
$position = '{"lat": ' . $position[0] . ', "lng": ' . $position[1] . '}';
$js_features[] = '{
"id": "' . $model['id'] . '",
"title": "' . addslashes($model['lang']['title']) . '",
"position": ' . $position . ',
"type": "' . $model['type_id'] . '",
"direction": "' . $model['area_id'] . '",
"region": "' . $model['region_id'] . '",
"power": "' . $model['electric_power'] . '",
"investment": "' . $model['investment'] . '",
"icon": "' . ($sign) . '",
"infoWindow": {"content": "' . addslashes(jsString($content)) . '"}
}';
//?? $bundle->baseUrl . '/img/curent-wind.png'
if (!empty($js_icons)) {
$js_icons = implode(",", $js_icons);
} else {
$js_icons = '';
}
if (!empty($js_features)) {
$js_features = implode(",", $js_features);
} else {
$js_features = '';
}
/**
* @param $attribute
* @param $model
*/
function getRowBlockInfo($attribute, $model)
{
$labels = (new ItemLang())->getAttributeLabel($attribute) ?? (new Item())->getAttributeLabel($attribute);
if (!empty($model[$attribute])):
echo Html::tag('div', Html::tag('div', Html::tag('div',
$labels,
['class' => 'title-2'])
. Html::decode($model[$attribute]), [
'class' => 'col-md-12 col-sm-12'
]), ['class' => 'row']);
endif;
}
?>
= Html::a(Yii::t('front', 'resource potential'), $urlMapResource, [
'class' => 'static-btn static-btn-resours'
])
. Html::a(Yii::t('front', 'projects'), $urlMapProjects, [
'class' => 'static-btn static-btn-project'
])
?>
= Html::tag('h1', Html::decode($model['lang']['title']), [
'class' => 'title-1 reset-margin-top'
]) ?>
-
= Yii::t('front', 'General Information') ?>
= (!empty($gallery)) ? Html::tag('li', Html::a(Yii::t('front', "Gallery"), '#galery', [
'data-toggle' => 'tab'
])) : '' ?>
= ($model['youtube_link']) ? Html::tag('li', Html::a(Yii::t('front', "Video"), '#video', [
'data-toggle' => 'tab'
])) : '' ?>
= $model['typeItem']['lang']['title'] ?>
= $model['area']['lang']['title'] ?>
= $this->render('vparts/info-table', [
'model' => $model,
'archive' => $archive
]) ?>
render('vparts/gallery', [
'model' => $model,
]);
endif;
if ($model['youtube_link']):
echo $this->render('vparts/video', [
'model' => $model
]);
endif;
?>
= Yii::t('front', 'show on map') ?>
= Html::tag('h2', Yii::t('front', 'about project'), ['class' => 'title-2'])
. Html::decode($model['lang']['description']) ?>
'title-2'])
. Html::decode(Item::type_of_promoterKeyRange()[$model['type_of_promoter']]), [
'class' => 'col-md-9 col-sm-12'
]), ['class' => 'row']);
endif;
//
getRowBlockInfo('contact_details_of_project_promoter', $model['lang']);
getRowBlockInfo('date_of_entry', $model);
//
if (!empty($model['current_stage_of_project_development']) && $model['type'] == 'project'):
echo Html::tag('div', Html::tag('div', Html::tag('div',
(new Item)->getAttributeLabel('current_stage_of_project_development'),
['class' => 'title-2'])
. Html::decode(Item::current_stage_of_project_developmentKeyRange()[$model['current_stage_of_project_development']] ?? ''), [
'class' => 'col-md-9 col-sm-12'
]), ['class' => 'row']);
endif;
getRowBlockInfo('share_of_project_equity_offered', $model);
getRowBlockInfo('expected_financial_return', $model['lang']);
getRowBlockInfo('kind_of_economic_activity', $model['lang']);
getRowBlockInfo('estimated_return_on_investment', $model['lang']);
getRowBlockInfo('technical_parameters', $model['lang']);
// getRowBlockInfo('total_investment', $model['lang']);
getRowBlockInfo('forms_cooperation_with_investor', $model['lang']);
getRowBlockInfo('achieved_effect', $model['lang']);
getRowBlockInfo('expenditure_additional_infrastructure', $model['lang']);
?>
registerJsFile($bundle->baseUrl . '/libs/infoBubble/infobubble.js');
$this->registerJsFile('//developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js');
$this->registerJsFile('//maps.googleapis.com/maps/api/js?key=AIzaSyCRjI5CDX5BPpcmvu6a6bSzDyMXThMaNeo&callback=initMap&language=' . mb_substr(Yii::$app->language, 0, 2));
$this->registerJs($script, yii\web\View::POS_HEAD);