</p> <div class="clearfix"></div> <p> <?php foreach ($model->images as $image) { ?> <?php echo Html::a(Html::img('/admin/images/products/galleries/' . $image->name, ['alt' => $image->alt, 'width' => 70, 'height' => 70, 'class' => 'img-thumbnail']), ['/admin/images/products/galleries/' . $image->name], ['data-lightbox' => 'product-gallery']); ?> <?php } ?> </p> <p><?php echo StarRating::widget(['name' => 'rating', 'value' => $model->rating, 'disabled' => $isRatingDisabled, 'pluginOptions' => ['size' => 'sm', 'showClear' => false, 'showCaption' => false], 'pluginEvents' => ["rating.change" => "function () {\n console.log(\$(this).val()); \n \$.ajax({\n type: 'POST',\n url: '/site/product-rating',\n data: {rating: \$(this).val(), id: {$model->id}},\n success: function(res) {\n // if (res === 'forbidden') {\n // \$('.star-rating').removeClass('rating-active');\n // \$('.star-rating').addClass('rating-disabled');\n // \$('#w0').prop('disabled', true);\n // return;\n // }\n location.reload();\n }\n });\n return false;\n }"]]); ?> </p> <?php echo ProductHelper::getButtons($model); ?> </article> </div> </div>
<?php /** * Created by PhpStorm. * User: jw * Date: 04/02/16 * Time: 21:09 */ use kartik\rating\StarRating; use yii\helpers\Html; /* @var $this yii\web\View */ $this->title = 'Reviews'; $this->params['breadcrumbs'][] = ['label' => 'Student', 'url' => ['student/index']]; $this->params['breadcrumbs'][] = 'Reviews'; ?> <h1> Reviews</h1> <!--<?php echo Html::a('Create new review', ['create'], ['class' => 'btn btn-success float']); ?> --> <br /> <h2> Reviews about me</h2> <?php echo StarRating::widget(['name' => 'avg_rating', 'value' => round($avgScore, 2, PHP_ROUND_HALF_UP), 'pluginOptions' => ['readonly' => true, 'showClear' => false, 'showCaption' => true, 'size' => 'sm']]); ?> <?php echo \yii\widgets\ListView::widget(['dataProvider' => $dataProvider, 'itemView' => "../../shared/review/_review"]);
<div class="grey-card-two"> <div class="image-box-small"> <h3 class="text-center color-blue bold-fonts"><?php echo Html::a($ratings->activity->title, ['activity/view', 'id' => $ratings->activity->id], ['class' => 'profile-link']); ?> </h3> <p class="text-center"><?php echo date("F jS, Y", strtotime($ratings->activity->date)); ?> </p> </div> <div class="rating-box"> <?php echo StarRating::widget(['name' => 'Rating[rate]', 'value' => $ratings->user_rate == 0 ? 0 : $ratings->user_rate, 'disabled' => true, 'id' => 'rateinput' . $ratings->id]); ?> <?php echo Html::hiddenInput('Rating[activity_id]', $ratings->id); ?> </div> </div> </div> <?php if (++$i > 2) { break; } } ?> <!-- ratings by children --> <?php
use kartik\rating\StarRating; /* @var $this yii\web\View */ /* @var $searchModel app\models\DepartmentsSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Departments'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="departments-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a('Create Departments', ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'name', 'group_id', 'rate1', ['attribute' => 'rate1', 'format' => 'raw', 'value' => function ($model) { return StarRating::widget(['model' => $model, 'name' => 'rating', 'pluginOptions' => ['showCaption' => false, 'showClear' => false, 'readonly' => true], 'value' => $model->rate1]); }], ['class' => 'yii\\grid\\ActionColumn']]]); ?> </div>
type: "gantt", renderAt: "chart-container", width: "100%", height: "600", dataFormat: "json", dataSource: myData }) .render(); }); ', $this::POS_READY); /* AUTHOR -ptr.nov- GRIDVIEW PILOT*/ $gv_pilot = GridView::widget(['id' => 'gv-pilot', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['label' => 'Header', 'attribute' => 'SORT', 'value' => function ($model, $key, $index, $widget) { $Proj_sort = Pilotproject::find()->where(['ID' => $model->SORT])->one(); return $Proj_sort->PILOT_NM; }, 'filter' => ArrayHelper::map(Pilotproject::find()->where('ID=SORT')->asArray()->all(), 'ID', 'PILOT_NM'), 'group' => true], ['label' => 'Sechedule', 'attribute' => 'PILOT_NM'], ['attribute' => 'PLAN_DATE1', 'filterType' => GridView::FILTER_DATE], ['attribute' => 'PLAN_DATE2', 'filterType' => GridView::FILTER_DATE], ['attribute' => 'BOBOT', 'format' => 'Html', 'value' => function ($model, $key, $index, $widget) { return StarRating::widget(['name' => 'rating_1']); }], ['attribute' => 'ACTUAL_DATE1', 'filterType' => GridView::FILTER_DATE], ['attribute' => 'ACTUAL_DATE2', 'filterType' => GridView::FILTER_DATE], ['label' => 'Discription', 'attribute' => 'DSCRP', 'mergeHeader' => true, 'value' => function ($model, $key, $index, $widget) { if ($model->DSCRP != '') { return substr($model->DSCRP, 0, 30) . ' ...'; //Author -ptr.nov- limit disply text } else { return ''; } }], ['label' => 'Status', 'attribute' => 'STATUS', 'format' => 'html', 'hAlign' => 'center', 'value' => function ($model) { if ($model->STATUS == 0) { return Html::a('<i class="fa fa-edit"></i> Open', '', ['class' => 'btn btn-success btn-sm', 'title' => 'Open']); } else { if ($model->STATUS == 1) { return Html::a('<i class="fa fa-close"></i> Close', '', ['class' => 'btn btn-danger btn-sm', 'title' => 'Closing']); } }
echo $model->description; ?> </p> </div> </div> <div class="rating-box box-body box box-primary"> <div class="col-md-12 background-white"><h3 class="color-blue text-aqua text-center">Current Rating</h3></div> <div class="col-md-6"> <div class="rating-box"> <?php $form = ActiveForm::begin(['action' => '@web/rating/create', 'id' => 'rateform' . $model->id]); ?> <?php echo StarRating::widget(['name' => 'Rating[rate]', 'value' => Rating::averageRating($model->id) == 0 ? 0 : Rating::averageRating($model->id), 'disabled' => Yii::$app->user->identity->level == 0 ? true : Rating::countEntered(Yii::$app->user->id, $model->id), 'id' => 'rateinput' . $model->id]); ?> <?php echo Html::hiddenInput('Rating[activity_id]', $model->id); ?> <?php //var_dump($model->id); die(); ?> <?php ActiveForm::end(); ?> </div> </div> <div class="col-md-6"> <h1 class="font-large color-green text-center">Your activity got <span class="color-orange"><?php echo $rate->averageRating($model->id);
<?php /** * @var \common\components\View $this * @var \app\modules\main\models\Review $model */ use yii\helpers\Html; use yii\helpers\ArrayHelper; use kartik\rating\StarRating; echo Html::beginTag('div', ['class' => 'review-item', 'id' => "comment-item-{$model->id}"]); echo Html::beginTag('div', ['class' => 'review-info']); echo Html::tag('span', $model->username, ['class' => 'review-username']); if (!empty($model->email)) { echo ' | '; echo Html::mailto($model->email, null, ['class' => 'review-email']); } echo ' | '; echo Html::tag('span', Yii::$app->formatter->asDatetime($model->created_at), ['class' => 'review-date']); echo Html::endTag('div'); $options = ArrayHelper::merge($model->metaFields->rating->inputClass['widgetOptions'], ['name' => "review-rating-{$model->id}", 'value' => $model->rating, 'readonly' => true, 'pluginOptions' => ['size' => 'xs']]); echo Html::tag('div', StarRating::widget($options), ['class' => 'review-rating']); echo Html::tag('div', $model->text, ['class' => 'review-text']); echo Html::endTag('div');
return Html::a('<button type="button" class="btn btn-primary btn-xs" style="width:50px; height:50px">View </button>', ['/hrd/employe/view', 'id' => $model->EMP_ID], ['data-toggle' => "modal", 'data-target' => "#activity-emp", 'data-title' => $model->EMP_ID]); }]]], 'panel' => ['type' => GridView::TYPE_SUCCESS, 'before' => Html::a('<i class="glyphicon glyphicon-plus"></i> ' . Yii::t('app', 'Create ', ['modelClass' => 'Employe']), '/hrd/employe/create', ['data-toggle' => "modal", 'data-target' => "#activity-emp", 'class' => 'btn btn-success'])], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'active'], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false, 'target' => GridView::TARGET_BLANK]]]); //---EMPLOYE RESIGN -- $tab_employe_resign = GridView::widget(['id' => 'resign', 'dataProvider' => $dataProvider1, 'filterModel' => $searchModel1, 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}', 'header' => 'Action', 'buttons' => ['view' => function ($url, $model, $key) { return Html::a('<button type="button" class="btn btn-danger btn-xs" style="width:50px; height:50px">View </button>', ['view', 'id' => $model->EMP_ID], ['data-toggle' => "modal", 'data-target' => "#activity-emp", 'data-title' => $model->EMP_ID]); }]], ['attribute' => 'PIC', 'format' => 'html', 'value' => function ($data) { return Html::img(Yii::getAlias('@HRD_EMP_UploadUrl') . '/' . $data->EMP_IMG, ['width' => '40']); }], 'EMP_ID', ['attribute' => 'EMP_NM'], 'EMP_NM_BLK', ['attribute' => 'corpOne.CORP_NM', 'filter' => $Combo_Corp], ['attribute' => 'deptOne.DEP_NM', 'filter' => $Combo_Dept], ['attribute' => 'deptsub.DEP_SUB_NM', 'filter' => $Combo_SubDept], ['attribute' => 'groupfunction.GF_NM', 'filter' => $Combo_GrpFnc], ['attribute' => 'groupseqmen.SEQ_NM', 'filter' => $Combo_Seq], ['attribute' => 'jobgrade.JOBGRADE_NM', 'filter' => $Combo_Jab], ['attribute' => 'sttOne.STS_NM', 'filter' => $Combo_Status], ['attribute' => 'EMP_JOIN_DATE', 'filterType' => \kartik\grid\GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['attribute' => 'EMP_JOIN_DATE', 'presetDropdown' => TRUE, 'convertFormat' => true, 'pluginOptions' => ['format' => 'Y-m-d', 'separator' => ' TO ', 'opens' => 'left']]], ['attribute' => 'EMP_RESIGN_DATE', 'filterType' => \kartik\grid\GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['attribute' => 'EMP_RESIGN_DATE', 'presetDropdown' => TRUE, 'convertFormat' => true, 'pluginOptions' => ['format' => 'Y-m-d', 'separator' => ' TO ', 'opens' => 'left']]]], 'panel' => ['type' => GridView::TYPE_SUCCESS], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'resign']], 'hover' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false, 'target' => GridView::TARGET_BLANK]]); ?> <?php use kartik\rating\StarRating; use kartik\sortable\Sortable; // With model & without ActiveForm $strRat = StarRating::widget(['name' => 'rating_1', 'pluginOptions' => ['disabled' => true, 'showClear' => false]]); /* use kartik\sortinput\SortableInput; //$model = Employe::find(); $sortImg= SortableInput::widget([ //'model' => $model, //'attribute' => 'EMP_IMG', 'hideInput' => false, 'delimiter' => '~', 'items' => [['content' =>$Combo_Corp]] ]); */ use kartik\affix\Affix; $content = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.';
<div class="col-sm-12"> <div class="blog-post-area"> <h2 class="title text-center">Новости</h2> <?php foreach ($models as $blog) { ?> <div class="single-blog-post"> <h3><?php echo Html::encode($blog->title); ?> </h3> <?php echo StarRating::widget(['name' => $blog->id, 'id' => $blog->id, 'value' => isset($blog->rating) ? $blog->rating : 0, 'pluginOptions' => ['readonly' => true, 'showClear' => false, 'showCaption' => false]]); ?> <div class="post-meta"> <ul> <li><i class="fa fa-user"></i><?php echo $blog->user->username; ?> </li> <li><i class="fa fa-clock-o"></i><?php echo date("H:i", $blog->created_at); ?> </li> <li><i class="fa fa-calendar"></i><?php echo date("d m Y", $blog->created_at); ?>
<h2 class="product-list"><?php echo Html::a($product->title, ['/' . $product->slug_ru]); ?> </h2> <p><?php echo Html::a(Html::img('/admin/images/products/titles/' . $product->image, ['alt' => $product->image_alt, 'width' => 150, 'height' => 150, 'class' => 'leftimg img-thumbnail']), ['/' . $product->slug_ru]); echo nl2br($product->short_description, false); ?> </p> <p><?php echo Html::a('Подробнее »', ['/' . $product->slug_ru], ['class' => 'btn btn-default']); ?> </p> <div class="clearfix"></div> <p><?php echo StarRating::widget(['name' => 'rating', 'value' => $product->rating, 'disabled' => true, 'pluginOptions' => ['size' => 'sm', 'showClear' => false, 'showCaption' => false]]); ?> </p> <?php echo ProductHelper::getButtons($product); ?> </article> <hr> <?php } ?> </div> </div> </div>
/** * Created by PhpStorm. * User: dev * Date: 11/18/15 * Time: 13:53 */ use yii\widgets\ActiveForm; use yii\helpers\Html; use unclead\widgets\MultipleInput; use unclead\widgets\MultipleInputColumn; use kartik\date\DatePicker; use kartik\select2\Select2; use kartik\growl\Growl; echo DatePicker::widget(['name' => 'check_issue_date', 'value' => date('d-M-Y', strtotime('+2 days')), 'options' => ['placeholder' => 'Select issue date ...'], 'pluginOptions' => ['format' => 'dd-M-yyyy', 'todayHighlight' => true]]); echo \kartik\time\TimePicker::widget(['name' => 'start_time', 'value' => '11:24', 'pluginOptions' => ['showSeconds' => false, 'showMeridian' => false]]); echo \kartik\rating\StarRating::widget(['name' => 'rating_1', 'pluginOptions' => ['disabled' => false, 'showClear' => true]]); ?> <?php $form = ActiveForm::begin([]); ?> <h3>Single column</h3> <?php echo $form->field($model, 'emails')->widget(\unclead\widgets\MultipleInput::className(), ['limit' => 6, 'allowEmptyList' => false, 'enableGuessTitle' => true, 'min' => 2, 'addButtonPosition' => \unclead\widgets\MultipleInput::POS_HEADER])->label(false); //echo $form->field($model, 'list')->widget(Select2::classname(), [ // 'data' => \app\models\TestModel::getTestDataList(), // 'language' => 'de', // 'options' => ['placeholder' => 'Select a state ...', 'multiple' => true],
foreach ($dataProvider->models as $review) { ?> <div class="review-preview"> <a href="<?php echo Url::to(['/review/view', 'id' => $review->id]); ?> "> <h2 class="review-title"> <?php echo $review->title; ?> </h2> </a> <?php echo StarRating::widget(['id' => 'rating' . $review->id, 'name' => 'rating', 'value' => $review->rating, 'pluginOptions' => ['readonly' => true, 'showClear' => false, 'showCaption' => false, 'stars' => 5, 'size' => 'xs']]); ?> <h3 class="review-subtitle"> <?php echo StringHelper::truncateWords($review->text, 30); ?> </h3> <?php if (isset($author)) { $cities = implode(', ', ArrayHelper::getColumn($review->cities, 'name')); ?> <p class="review-meta"> <?php echo empty($cities) ? 'Для всех городов России' : $cities;