%h3
  %span
    = t('Violation documents')
- $user = is_numeric($event->ValidatedBy) ? User::model()->findByPk($event->ValidatedBy)->username : $event->ValidatedBy
%table.table.table-striped.table-condensed
  %tbody
    - foreach ($event->eventBehaviors as $eventBehavior)
      - $currentBehavior = $eventBehavior->behavior->description
      - foreach ($eventBehavior->violationDocuments as $violationDocument)
        %tr
          %td
            =t('Violation')
          %td
            #{$currentBehavior}
        %tr
          %td
            =t('Validation Time')
          %td
            = DateHelper::formatLocalDate($event->ValidationTime)
            = DateHelper::formatISO9075Time($event->ValidationTime)
        %tr
          %td
            =t('Validated By')
          %td
            = $user
        %tr
          %td
            =t('Type')
          %td
            =t($violationDocument->status)
            - if($violationDocument->status !== 'missing' && $violationDocument->status !== 'failed' && $violationDocument->status !== 'invalid')
              %a.icon-eye-open(href="#{$this->createUrl('Event/violationDocumentPreview', array('violationDocumentId'=>$violationDocument->id))}" target="_blank")
        %tr
          %td
            ='ADI'
          %td
            #{$event->Protocol}
        %tr
          %td
            =t('Comment')
          %td
            #{$eventBehavior->comment}

        

