Yii Framework Forum: CStar Rating renders false - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CStar Rating renders false Rate Topic: -----

#1 User is offline   Afnan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 18-October 11

Posted 15 March 2012 - 07:07 AM

Hi I am using CStar in widget but ever since it renders buggy i do not know why. it renders all in one page rather than its orignal position

i am using it like this

image name
* * * * *
image name
* * * * *

image name
* * * * *

image name
* * * * *

but it renders all on one place

and code for view is _view file

<div class="view">
    <div style="float: left;display: block;">
        <?php $img = CHtml::image(yii::app()->baseUrl.'/images/placeImages/'.$data->name
           .'/'.$data->thumbnail,$data->thumbnail ,array('style'=>'width:70px; height:70px;display:block;'));
        echo CHtml::link($img, array('view', 'id'=>$data->id),array('style'=>'width:70px; height:70px;display:block;'));?>
    </div>
    <div style="padding-left: 80px; width: 150px; height: 90px;display: block;">
        <span>
            <?php echo CHtml::link(CHtml::encode($data->name).'</span>', array('view', 'id'=>$data->id));?> 
       </span>
        <br/>
        <span >
            <?php echo $data->placeType->type;?>
        </span>
        <span style="float:left;">
            <?php 
            echo CHtml::beginForm();
            $this->widget('CStarRating',array(
                'name'=>'rating',
                'model'=>$data,
                'readOnly'=>true,
                'attribute'=>'hotel_rating',
                'maxRating'=>5,
                'starCount'=>5,
                ));

            ?>
        </span>
        
    </div>    
</div>
<hr />
 


view.php
<div class="span-6">
<h2 id="latest_dishes">Top Places </h2>
<?php
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$topPlaces,
'summaryText'=>'',
'itemView'=>'_view',
'itemsCssClass'=>'items-float',
));
?>
</div>

Attached File(s)


0

#2 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 15 March 2012 - 03:37 PM

As I promised in the channel I posted a guide in tips,trix and tutorials on this topic. Hope you get it to work:)
1

#3 User is offline   Afnan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 18-October 11

Posted 16 March 2012 - 12:06 PM

View PostSampa, on 15 March 2012 - 03:37 PM, said:

As I promised in the channel I posted a guide in tips,trix and tutorials on this topic. Hope you get it to work:)

link?
0

#4 User is offline   Pep 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 06-August 11

Posted 08 May 2012 - 04:55 AM

View PostAfnan, on 16 March 2012 - 12:06 PM, said:

link?


http://www.yiiframew...r+rating+widget
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users