Esempio n. 1
0
<?php

use yii\helpers\Html;
use yii\helpers\Url;
use app\assets\LightBoxAsset;
use shiyang\masonry\Masonry;
/* @var $this yii\web\View */
/* @var $model app\modules\home\models\Album */
LightBoxAsset::register($this);
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'My Albums'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="album-view">
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
echo Html::a('<i class="glyphicon glyphicon-edit"></i> ' . Yii::t('app', 'Edit Album'), ['/home/album/update', 'id' => $model->id], ['class' => 'btn btn-default']);
?>
    <?php 
if ($model->photoCount == 0 && $model->created_by === Yii::$app->user->id) {
    ?>
        <div class="no-photo">
            <img src="<?php 
    echo Yii::getAlias('@web/images/no_photo.png');
    ?>
" class="no-picture" alt="No photos">
            <div class="no-photo-msg">                       
Esempio n. 2
0
<?php

/**
 * Created by PhpStorm.
 * User: uniqbook
 * Date: 11.12.15
 * Time: 20:36
 * @var \yii\data\ActiveDataProvider $dataProvider
 * @var \app\models\BookSearch $model
 */
\app\assets\LightBoxAsset::register($this);
use yii\helpers\ArrayHelper;
use yii\bootstrap\Html;
?>

	<h1>Книги</h1>

<?php 
\yii\widgets\Pjax::begin();
$form = \yii\widgets\ActiveForm::begin(['id' => 'searchForm', 'method' => 'GET', 'action' => \yii\helpers\Url::to('/books/index')]);
?>
	<div class="row">
		<div class="col-md-2">
			<?php 
echo $form->field($model, 'author_id')->dropDownList(ArrayHelper::map(\app\models\Author::find()->all(), 'id', 'fullName'), ['prompt' => 'Выберите автора']);
?>
		</div>
		<div class="col-md-2">
			<?php 
echo $form->field($model, 'name');
?>