Renders a 7x3 table (days of the week X periods of the day) representing the availability of the users.
If the var readOny is set false then allow users to modify the availability.
If the var userId the the same of the logged user, readOnly is set true.
Sorry it has been developed in Italian, but the code is in English.
Should be translated easily, if you have any problem just comment the extension.
If you translate it please let me know so I can make it available to the others
Now available in Portuguese-Brazilian by scoob.junior

Extract to the project main folder.
Import the Date component in config/main.php
return array( ... 'import'=>array( 'components.Date', ), ...
Add this column to the user table
availabiliy TEXT NULL DEFAULT NULL,
Add this line to the css/main.css
#availability .selected { background-color: #33FF33; } #availability th { background: none repeat scroll 0 0 #C3D9FF; } #availability td, #availability th { cursor: pointer; /*Stupid IE*/ cursor: hand; } .hidden { display: none; }
Start the widget like this
$this->widget('Availability', array( 'userId'=> $model->id, ));
fixed cells toggling.
Now select all, day and period clicking select or deselect all cells instead of toggle them
Total 4 comments
Hey scoob.junior, thanks, I've sent you an email ;)
Hey! Good job!
How do I send you the pt-br translation?
Regards!
You're right johnatan, thanks.
I guess that if value readOnly is set to true, then users shouldn't be able to modify the availability.
Leave a comment
Please login to leave your comment.