availability Table with selectable cells representing periods of the week

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

Example

Installation

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 ~~~ [sql] availabiliy TEXT NULL DEFAULT NULL, ~~~ Add this line to the css/main.css ~~~ [css]

availability .selected {

  1. Installation
  2. Usage
  3. Changelog
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;

} ~~~

Usage

Start the widget like this

$this->widget('Availability', array(
    'userId'=> $model->id,
    ));

Changelog

May 5, 2011 version 1.1

fixed cells toggling.
Now select all, day and period clicking select or deselect all cells instead of toggle them

4 0
4 followers
1 098 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: Draga
Created on: Apr 26, 2011
Last updated: 13 years ago

Downloads

show all

Related Extensions