- $monthList = CHtml::listData(DateHelper::monthList(true), 'value', 'label')
- $dayList = CHtml::listData(DateHelper::dayList(true), 'value', 'label')

- $form=$this->beginWidget('DynamicTabularForm',array(    |
  'id'=>'special-day-form',                                            |
  'enableAjaxValidation'=>false,                                      |
  'defaultRowView'=>'_timeSlotForm'                                   |
));                                                                   |

 
.time-schedule-field   
  != $form->textFieldRow($model,'Descrizione',array('class'=>'span5','maxlength'=>250))
.time-schedule-field.start-row
  != $form->dropDownListRow($model,'start_day', $dayList, array('class'=>'span1'))
.time-schedule-field    
  != $form->dropDownListRow($model,'start_month', $monthList, array('class'=>'span2'))
.time-schedule-field    
  != $form->dropDownListRow($model,'end_day', $dayList, array('class'=>'span1'))
.time-schedule-field  
  != $form->dropDownListRow($model,'end_month', $monthList, array('class'=>'span2'))
.time-schedule-field.start-row
  =t('Scope').":"
.time-schedule-field
  != $form->checkBoxRow($model,'for_run')
.time-schedule-field
  != $form->checkBoxRow($model,'for_whitelisttable')
.time-schedule-field
  != $form->checkBoxRow($model,'for_ztl')

.time-schedule-field.start-row
  #event-search-page
    -$path = 'time-schedule'
    %label(for="TimeSchedule_icon")
      =t('Icon')
    %select#TimeSchedule_icon(name="TimeSchedule[icon]")
      -$images=ImageHelper::getImagesAt($path)
      -$images[] = ''
      -foreach($images as $imgsrc)
        - $key = basename($imgsrc)
        - $selected = $model->icon == $key
        -if($imgsrc == '')
          -if($selected)
            %option(value="" selected="selected")
              =t('None')
          -else
            %option(value="")
              =t('None')
        -else          
          - $relativeUrl = $path.'/'.$key
          - $url = ImageHelper::getImageUrl($relativeUrl)
          - $tag = ImageHelper::getImageTag($relativeUrl, $key, array('width'=>"20",'height'=>"20"))
          - $dataContent = "<div class='data-content'><div class='icc'>$tag</div></div>"
          -if($selected)
            %option(value="#{$key}" data-content="#{$dataContent}" selected="selected")
          -else
            %option(value="#{$key}" data-content="#{$dataContent}")
  
.row(style="clear: left")
  .span
    %h3
      = t("Time Slots")

!= $form->rowForm($timeSlots)

.form-actions
  - $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'type'=>'primary', 'label'=>$model->isNewRecord ? t('Create') : t('Save'), ));
  - $this->widget('bootstrap.widgets.TbButton', array( 'buttonType'=>'link', 'label'=> t('Cancel'), 'url' => Yii::app()->createAbsoluteUrl('timeSchedule/index')));                                                            |
- $this->endWidget()
