- $row_id = "timeslot-" . $key
- $typeOfDayList = CHtml::listData(TimeSlot::getTypeOfDayList(), 'value', 'label')
- $dayOfTheYear = $model->dayOfTheYear;
- $dayOfTheYearStr = ((!empty($dayOfTheYear))? ($dayOfTheYear->format(Yii::app()->params['dayoftheyearselect_format'][Yii::app()->language]['view'])): '')

.time-slot-sub-form.span9(id="#{$row_id}")
  != $form->hiddenField($model, "[$key]ID");
  != $form->updateTypeField($model, $key, "updateType", array('key' => $key));
  .time-slot-field
    != $form->textFieldRow($model,"[$key]Descrizione",array('class'=>'span','maxlength'=>250))
  .time-slot-field
    != $form->dropDownListRow($model,"[$key]WeekDay", $typeOfDayList, array('class'=>'span2','maxlength'=>250))
  .time-slot-field
    != $form->label($model, "dayOfTheYear")
    .input-append.date.dayofyear-picker
      %input(data-initial-value="#{((isset($dayOfTheYear))? ('2000-'.$dayOfTheYear->format('m-d')): '-')}" data-format="#{Yii::app()->params['dayoftheyearselect_format'][Yii::app()->language]['view']}" type="text" name="TimeSlot[#{$key}][dayOfTheYear]" value="#{$dayOfTheYearStr}")
        %span.add-on
          %i(data-time-icon="icon-time" data-date-icon="icon-calendar")
  .time-slot-field
    != $form->label($model, "[$key]TimeStart")
    #datepicker-start-time.input-prepend.input-append.time-picker(data-initial-value="00:00")
      %input.span1(data-format="#{Yii::app()->params['timeselect_format'][Yii::app()->language]['view']}" type="text"  name="TimeSlot[#{$key}][TimeStart]" data-initial-value="2000-01-01T#{$model->TimeStart}Z" value="00:00")
      %span.add-on
        %i(data-time-icon="icon-time" data-date-icon="icon-calendar")
  .time-slot-field
    != $form->label($model, "[$key]TimeStop")
    #datepicker-start-time.input-prepend.input-append.time-picker(data-initial-value="23:59")
      %input.span1(data-format="#{Yii::app()->params['timeselect_format'][Yii::app()->language]['view']}" type="text"  name="TimeSlot[#{$key}][TimeStop]" data-initial-value="2000-01-01T#{$model->TimeStop}Z" value="23:59")
      %span.add-on
        %i(data-time-icon="icon-time" data-date-icon="icon-calendar")
  .time-slot-button-delete
    != $form->deleteRowButton($row_id, $key);
