DzRaty Yii Extension. Wrapper for jQuery Raty, a star rating plugin
JavaScript PHP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
messages/es
DzRaty.php
DzRatyDataColumn.php
README.md

README.md

dzRaty

dzRaty is an extension for Yii framework. It is a wrapper for jQuery Raty, a plugin developed by Washington Botelho that generates a customizable star rating.

To get started, check http://yii.dezero.es/dzraty

Installation

Requirements: jQuery and Yii framework 1.0 or above (tested on 1.1.12).

Extract downloaded file to your Yii application extensions folder (default: protected/extensions).

Usage

Edit mode

Using with an attribute model. weight is a sample attribute name

$this->widget('ext.DzRaty.DzRaty', array(
	'model' => $model,
	'attribute' => 'weight',
));

Using with a single input element

$this->widget('ext.DzRaty.DzRaty', array(
	'name' => 'my_rating_field',
	'value' => 3,
));

View / Read-only mode

$this->widget('ext.DzRaty.DzRaty', array(
	'name' => 'my_rating_field',
	'value' => 3,
	'options' => array(
		'readOnly' => TRUE,
	),
));

Localization - i18n

dzRaty translates all translatable elements of jQuery Star plugin. You can place your own translation file under DzRaty/messages.

Current version contains translation files for spanish. You could simply duplicate and edit one of them.

Resources

www.dezero.es