private function getTemplatePreview(Uploads $model) { $filePath = Album::getUploadUrl() . $model->ref . '/thumbnail/' . $model->realfilename; $isImage = $this->isImage($filePath); if ($isImage) { $file = Html::img($filePath, ['class' => 'file-preview-image', 'alt' => $model->filename, 'title' => $model->filename]); } else { $file = "<div class='file-preview-other'> " . "<h2><i class='glyphicon glyphicon-file'></i></h2>" . "</div>"; } return $file; }