public function init() { if (!empty($this->model->gallery)) { $gallery = explode(',', $this->model->gallery); foreach ($gallery as $image) { $this->pluginOptions['initialPreview'][] = Html::img(LetHelper::getFileUploaded($image), ['class' => 'file-preview-image']); $this->pluginOptions['initialPreviewConfig'][] = ['caption' => end(explode('/', $image)), 'url' => Url::to(['/common/upload/remove', 'id' => Yii::$app->request->get('id'), 'key' => $image, 'model' => get_class($this->model)]), 'key' => $image]; } } $this->model->gallery = $this->model->gallery; parent::init(); }
<div class="row"> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-title"> <h5><?php echo Yii::t('common', 'Information'); ?> </h5> </div> <div class="ibox-content"> <?php $form = ActiveForm::begin(['id' => 'formDefault', 'layout' => 'horizontal', 'options' => ['enctype' => 'multipart/form-data'], 'fieldConfig' => ['horizontalCssClasses' => ['label' => 'col-sm-2', 'wrapper' => 'col-sm-10', 'error' => 'help-block m-b-none', 'hint' => '']]]); // Image $imageConfig = ['options' => ['accept' => 'uploads/*'], 'pluginOptions' => ['previewFileType' => 'image', 'showCaption' => FALSE, 'showRemove' => FALSE, 'showUpload' => FALSE, 'browseClass' => 'btn btn-primary btn-block', 'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ', 'browseLabel' => 'Select Photo', 'removeClass' => 'btn btn-danger', 'removeLabel' => "Delete", 'removeIcon' => '<i class="glyphicon glyphicon-trash"></i>', 'allowedFileExtensions' => ['jpg', 'gif', 'png', 'jpeg']]]; if (!empty($model->image)) { $imageConfig['pluginOptions']['initialPreview'] = [Html::img(LetHelper::getFileUploaded($model->image), ['class' => 'file-preview-image'])]; } // END Image $tabs = [['label' => Yii::t('common', 'General information'), 'content' => $form->field($model, 'name')->textInput() . $form->field($model, 'class')->textInput() . $form->field($model, 'skin')->textInput() . $form->field($model, 'image')->widget(FileInput::classname(), $imageConfig) . $form->field($model, 'content')->widget(letyii\tinymce\Tinymce::className(), ['options' => ['style' => 'height: 400px;'], 'configs' => ['plugins' => 'moxiemanager advlist autolink lists link image charmap print preview hr anchor pagebreak ' . 'searchreplace wordcount visualblocks visualchars code fullscreen ' . 'insertdatetime media nonbreaking save table contextmenu directionality ' . 'emoticons template paste textcolor colorpicker textpattern', 'toolbar1' => 'insertfile undo redo | styleselect | fontselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image', 'toolbar2' => 'print preview media | forecolor backcolor emoticons', 'moxiemanager_image_settings' => ['moxiemanager_title' => 'Images', 'moxiemanager_extensions' => 'jpg,png,gif', 'moxiemanager_rootpath' => '/uploads/editor', 'moxiemanager_view' => 'thumbs'], 'external_plugins' => ['moxiemanager' => Url::base() . '/plugins/moxiemanager/plugin.min.js'], 'entity_encoding' => 'raw', 'force_p_newlines' => true, 'force_br_newlines' => false, 'auto_cleanup_word' => false, 'relative_urls' => true, 'convert_urls' => false, 'remove_script_host' => true, 'verify_html' => false, 'forced_root_block' => false, 'content_css' => 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css', 'templates' => Url::to(['template'])]]) . $form->field($model, 'description')->textarea() . $form->field($model, 'promotion')->widget(SwitchInput::className(['type' => SwitchInput::RADIO])) . $form->field($model, 'status')->widget(SwitchInput::className(['type' => SwitchInput::RADIO])), 'active' => true], ['label' => 'Seo', 'content' => $form->field($model, 'slug')->textInput() . $form->field($model, 'slug_prefix')->textInput() . $form->field($model, 'seo_url')->textInput() . $form->field($model, 'seo_title')->textInput() . $form->field($model, 'seo_desc')->textInput(), $form->field($model, 'seo_keyword')->textInput()]]; echo Html::hiddenInput('save_type', 'save'); echo yii\bootstrap\Tabs::widget(['items' => $tabs]); ActiveForm::end(); ?> </div> </div> </div> </div> </div>
?> <!-- MAIN --> <main id="main" class="main-container"> <!-- SECTION 1 --> <div class="section section-1"> <div class="container"> <div class="row"> <div class="col-xs-12"> <div class="media avatar"> <div class="media-left"> <a href="<?php echo Url::to(['/account/public-profile'], ['display_name' => $user->display_name]); ?> "> <?php echo Html::img(\app\helpers\LetHelper::getFileUploaded($user->image), ['class' => 'media-object', 'width' => '80', 'height' => '80']); ?> </a> </div> <div class="media-body"> <h4 class="media-heading"><?php echo Html::encode($user->userJob->getDisplayName()); ?> </h4> </div> </div> <dl class="row information"> <dt class="col-xs-12 col-sm-4">Company Name:</dt> <dd class="col-xs-12 col-sm-8"><?php echo $user->userJob->agent_company_name ? Html::encode($user->userJob->agent_company_name) : Yii::t('common', 'Not set'); ?>
<span class="text-uppercase">Posted by this approved recruiter</span> </td> <td> <?php echo Html::a(Yii::t('job', 'View All Jobs'), ['job-search', 'Job[created_by]' => $userJob->_id], ['class' => '']); ?> </td> <td colspan="2"><?php echo Html::a(Yii::t('job', 'View Detail'), ['account/public-profile', 'display_name' => (string) $userJob->user->display_name]); ?> </td> </tr> <tr> <td rowspan="5"> <?php echo Html::img(\app\helpers\LetHelper::getFileUploaded($userJob->user->image), ['class' => 'avatar avatar-100 photo', 'width' => '100', 'height' => '100']); ?> </td> <td>Recruiter Name</td> <td colspan="2"> <?php if (UserJob::canView()) { ?> <span><?php echo $userJob->getDisplayName(); ?> </span> <?php } else { ?> <a href="<?php
/** * Get path file * @return string Path cua file */ public function getFilePath() { return LetHelper::getFileUploaded($this->file_path, LetHelper::PATH); }
?> </a> </li>--> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane active"> <div class="table-responsive"> <table class="table table-bordered table-hovered table-striped" id="table-basic-infomation"> <tbody> <tr> <th><?php echo Yii::t('job', 'Avatar Image'); ?> </th> <td><?php echo Html::img(\app\helpers\LetHelper::getFileUploaded(Yii::$app->user->identity->image), ['class' => 'media-object', 'width' => '100']); ?> </td> </tr> <?php if (($latestEmployer = $model->getLatestEmployer()) != null) { ?> <tr> <th><?php echo Yii::t('job', 'Latest Employer'); ?> </th> <td><?php echo Html::encode($latestEmployer->company_name); ?> </td>