.page-header
  %h2
    .icon-list
    = t('Results')

%h4=$plateList->getListTitle()
    
%br

-$errorsPlates = array()
%table.table.table-condensed
  %tr
    %th=t('Plate')
    %th=t('Result')
    %th=t('Message')
  -foreach($messages as $msg)
    -if(!$msg['result'])
      -$errorsPlates[] = $msg['plate']
    %tr
      %td
        =$msg['plate']
      %td
        %font(color="#{$msg['color']}")
          =$msg['result']?t('Success'):t('Error')
      %td
        =$msg['message']

-$errorsPlates = array_remove_dup($errorsPlates)
-if(count($errorsPlates)>0)
  -$errorPlatesString = implode(' ',$errorsPlates)
  %strong
    %a(href="#{url('plateAuthorization/newWhitelist', array('plateListId'=>$plateList->id, 'plate'=>$errorPlatesString))}")
      =t('Some plates were not insert correctly, click here to try again.')
      =" (".t('Plates').": $errorPlatesString)"