Пример #1
0
    <h1>Оставить отзыв</h1>

    <p class="note">Поля, помеченные <span class="required">*</span> обязательны для заполнения</p>

    <?php 
//echo $form->errorSummary($model);
echo $form->hiddenField($model, 'good_id');
?>

    <div class="row">
        <strong><?php 
echo $form->labelEx($model, 'rating');
?>
 </strong>
        <?php 
echo $form->dropDownList($model, 'rating', CHtml::listData(RatingDesc::model()->cache(3600)->findAll(), 'id', 'desc'), array('empty' => 'выбрать...'));
?>
        <?php 
echo $form->error($model, 'rating');
?>
    </div>

    <div class="row">
        <p><strong><?php 
echo $form->labelEx($model, 'positive');
?>
</strong></p>
        <?php 
echo $form->textArea($model, 'positive', array('rows' => 6, 'cols' => 50, 'maxlength' => 4000));
?>
        <?php 
Пример #2
0
		</div>
		<div class="b-rating__with_text">
        <?php 
    $this->endCache();
}
?>
		<?php 
$good->ShowRating();
echo '<span>&nbsp;&nbsp; ' . $good->marksCount . ' ' . CAlexHelper::GetFormatWord('оценка', $good->marksCount) . '</span>';
?>

		</div>
		<div class="b-rating__with_text">
			<?php 
if (!Yii::app()->user->isGuest) {
    $this->widget('CStarRating', array('name' => 'user-input-rating', 'minRating' => '1', 'maxRating' => '5', 'value' => $good->GetUserRating(), 'starWidth' => '15', 'ratingStepSize' => '1', 'titles' => CHtml::listData(RatingDesc::model()->cache(3600)->findAll(), 'id', 'desc'), 'allowEmpty' => false, 'callback' => 'function(value) {SetRating(value, ' . $good->id . ');}', 'cssFile' => '/css/rating/jquery.rating.css'));
    echo '<span>&nbsp;&nbsp;оцените модель</span>';
}
?>
		</div>
		<ul>
			<li><?php 
if (Yii::app()->shoppingCart->contains($good->id)) {
    echo 'Этот товар уже есть в вашей корзине <br>';
    echo CHtml::link('Добавить еще', '#', array('ajax' => array('url' => $this->createUrl('order/addtocard', array()), 'type' => 'POST', 'data' => 'id=' . $good->id, 'success' => 'function(data){UpdateShoppingCart();}')));
} else {
    echo CHtml::link('Добавить в корзину', '#', array('ajax' => array('url' => $this->createUrl('order/addtocard', array()), 'type' => 'POST', 'data' => 'id=' . $good->id, 'success' => 'function(data){UpdateShoppingCart();}')));
}
?>
</li>
			</ul>