?> </h4> </div> <div class="modal-body"> <?php if ($type == FileType::TYPE_IMAGE) { ?> <p> <a target="_blank" class="media-link" href="<?php echo $url; ?> ">Download / View</a> </p> <span class="lightbox-thumb"> <?php echo Lightbox::widget(['files' => [['thumb' => $url, 'original' => $url, 'title' => $title]]]); ?> </span> <?php } elseif ($type == FileType::TYPE_VIDEO) { ?> <p> <a target="_blank" class="media-link" href="<?php echo $url; ?> ">Download / View</a> </p> <span> <div class="flowplayer"> <video> <source type="<?php
echo Html::encode($this->title); ?> </h1> <?php echo $this->render('_search', ['model' => $searchModel, 'dropDownSearchItems' => $dropDownSearchItems]); ?> <p> <?php echo Html::a(Yii::t('app', 'Create Book'), ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'name', ['label' => Yii::t('app', 'Preview'), 'format' => 'raw', 'contentOptions' => ['class' => 'grid-view-img-cell'], 'value' => function ($data) { $lightboxWidget = Lightbox::widget(['files' => [['thumb' => $data->preview, 'original' => $data->preview]]]); //there was not found the way to set style to Lightbox::widget img, //thus using brut forse till this widget wont be improved //alt is option that always appears in widget compiled html return str_replace('alt', 'style=\'max-width:100%\'', $lightboxWidget); }], ['label' => Yii::t('app', 'Author'), 'attribute' => 'author_id', 'format' => 'raw', 'value' => function ($data) { return $data->author->firstname . " " . $data->author->lastname; }], 'date', ['attribute' => 'created_at', 'value' => function ($data) { return date('Y-m-d H:m:s', $data->created_at); }], ['attribute' => 'updated_at', 'value' => function ($data) { return date('Y-m-d H:m:s', $data->updated_at); }], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update} {delete}', 'headerOptions' => ['class' => 'activity-view-link'], 'contentOptions' => ['class' => 'padding-left-5px'], 'buttons' => ['view' => function ($url, $model, $key) { return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', '/book/' . $key, ['class' => 'activity-view-link', 'title' => Yii::t('yii', 'View'), 'data-toggle' => 'modal', 'data-target' => '#activity-modal', 'data-id' => $key]); }]]]]); ?>