%table.table.table-condensed.span12
  %thead
    %tr
      %th
        = t('Gate')
      - foreach($months as $month)
        %th
          %a(href="#{Yii::app()->createUrl('ExportRegistrationReport/serverFinalReport', array('idServer' => $eventServer->id , 'year' => $month['year'], 'month' => $month['month'], 'gate' => -1))}" target="_blank")
            = $month['month'].'/'.$month['year']
  %tbody
    - foreach($gates as $gate)
      %tr
        %td
          = $gate->gate_sn
        - foreach($months as $month)
          - $mn = $month['month'];
          - $yr = $month['year'];  
          - $exp = isEmpty($expCounters["$gate->gate_sn"]["$yr"]["$mn"]['exported']) ? 0: $expCounters["$gate->gate_sn"]["$yr"]["$mn"]['exported']; 
          - $del = isEmpty($expCounters["$gate->gate_sn"]["$yr"]["$mn"]['deleted']) ? 0: $expCounters["$gate->gate_sn"]["$yr"]["$mn"]['deleted'];
          %td
            %a(href="#{Yii::app()->createUrl('ExportRegistrationReport/serverFinalReport', array('idServer' => $eventServer->id , 'year' => $month['year'], 'month' => $month['month'], 'gate' => $gate->gate_sn))}" target="_blank")
              = $exp.'/'.$del
  