%h3= t('Last violations')

%header
  .row.clearfix
    .span5
      .gate-description
        - if(isset($gate))
          %p.gate-name
            %i.icon-road
            = $gate->Descrizione
        - else
          %p.gate-name= t('All gates selected')
        %p.update-time
          = t("Updated at:")
          = DateHelper::formatLocalDateTime()

    .span3.pull-right
      .update-controls
        %form.form-inline
          %label.checkbox
            %input.automatic-violations-preview(type="checkbox" checked="checked")= t('Automatic update')
          %button.update-violations-preview.btn.btn-small(type="button")= t('Update')

%article.violations
  - if (count($violations)>0)
    %table.table.table-condensed
      %thead
        %tr          
          %th
            %img(width="16px")
            = t('License plate')
          %th= t('Gate')
          %th= t('Date/Time')
          %th= t('Km/h')
          %th= t('Class')
          %th= t('Colors')
          %th
          
      %tbody
        - foreach($violations as $violation)
          - $violationPresenter = new EventPresenter($violation);
          - $this->renderPartial('violations/_violationRow', array('violation' => $violationPresenter))
  - else
    %p= t('No recent violations')


#modal-violation-photo-preview
