コード例 #1
0
ファイル: forecast.php プロジェクト: czechcamus/dasport
<?php

/* @var $this yii\web\View */
/* @var $content \frontend\models\MenuContent */
/* @var $page \common\models\Page */
use frontend\components\Forecast;
use frontend\utilities\FrontEndHelper;
use pavlinter\display\DisplayImage;
$page = $content->content;
echo '<body>';
echo '<h1>' . $content->title . '</h1>';
if ($page->image) {
    echo DisplayImage::widget(['width' => 200, 'height' => 200, 'category' => 'all', 'image' => $page->image->filename]);
}
if ($page->perex) {
    echo '<div class="perex">' . $page->perex . '</div>';
}
if ($page->description) {
    echo '<div class="description">';
    echo FrontEndHelper::parsePdfContent($page->description);
    echo '</div>';
}
echo Forecast::widget(['viewName' => 'full2ColumnsForecast']);
echo '</body>';
コード例 #2
0
ファイル: homepage.php プロジェクト: czechcamus/dasport
				</div>
			</div>
			<div class="col s12 m4">
				<div class="info-important">
					<i class="material-icons medium">cloud</i>
					<h4><?php 
echo Yii::t('front', 'weather');
?>
</h4>
					<p>
						<?php 
echo Weather::widget(['viewName' => 'hpWeather']);
?>
						<br>
						<?php 
echo Forecast::widget(['viewName' => 'hpForecast']);
?>
					</p>
					<?php 
echo Html::a('<i class="material-icons right">forward</i>' . Yii::t('front', 'forecast'), MenuContent::getMenuUrlFromId(Yii::$app->params[Yii::$app->language]['weatherMenuId']), ['class' => 'btn']);
?>
				</div>
			</div>
			<div class="col s12 m4">
				<div class="info-important">
					<i class="material-icons medium">place</i>
					<h4><?php 
echo Yii::t('front', 'map of sports');
?>
</h4>
					<p><?php