#time-schedule-index-page
  
  .page-header
    %h2
      %li.icon-cog
      = Yii::t("app", "Time Schedules")
      
  .row
    - $timeSchedules = $dataProvider->data
    .tableContainer.pagination-data-container
      %table.table.span12
        %thead
          %tr
          %tr
            %th
            %th= t('ID')
            %th= t('Description')
            %th= t('Start Date')
            %th= t('End Date')
            %th= t('Creation date')
            %th= t('For tasks')
            %th= t('For plate authorizations')
            %th= t('For ZTL')
            %th= t('In use')
            %th
              %a.btn.btn-mini(href="#{Yii::app()->createAbsoluteUrl('timeSchedule/create')}")
                =Yii::t('app', 'New time schedule')   

        %tbody
          - foreach($timeSchedules as $index => $timeSchedule)
            %tr
              %td
                !=$timeSchedule->getIconTagFinal()
              %td
                =$timeSchedule->ID
              %td
                !=SystemInfoHelper::getTimeScheduleCoolName($timeSchedule->ID)
              %td
                =$timeSchedule->start_day
                =DateHelper::getMonthName($timeSchedule->start_month)
              %td
                =$timeSchedule->end_day
                =DateHelper::getMonthName($timeSchedule->end_month)
              %td
                =DateHelper::formatMedium($timeSchedule->epoch)
              %td
                %a(href="#{url('TimeSchedule/SwitchParam', array('id'=>$timeSchedule->ID, 'param'=>'for_run'))}")
                  -if($timeSchedule->for_run)
                    .icon-check
                  -else
                    .icon-check-empty
              %td
                %a(href="#{url('TimeSchedule/SwitchParam', array('id'=>$timeSchedule->ID, 'param'=>'for_whitelisttable'))}")
                  -if($timeSchedule->for_whitelisttable)
                    .icon-check
                  -else
                    .icon-check-empty
              %td
                %a(href="#{url('TimeSchedule/SwitchParam', array('id'=>$timeSchedule->ID, 'param'=>'for_ztl'))}")
                  -if($timeSchedule->for_ztl)
                    .icon-check
                  -else
                    .icon-check-empty
              %td
                -if($timeSchedule->IsInUse)
                  .icon-check
                -else
                  .icon-check-empty
              %td
                %a.icon-pencil(href="#{Yii::app()->createUrl('timeSchedule/update', array('id' => $timeSchedule->ID))}")
                -if(!$timeSchedule->IsInUse)
                  %a.icon-trash(href="#{Yii::app()->createUrl('timeSchedule/delete', array('id' => $timeSchedule->ID))}")
                %a.show-hide-details-button.icon-plus(data-details-id="time-schedule-details-#{$index}")
            %tr.time-schedule-details(id="time-schedule-details-#{$index}" style="display:none")
              %td
              %td(COLSPAN="5")
                - $this->renderPartial('_timeSlotsDetails', array('timeSchedule'=>$timeSchedule))
                               