- $alertP = new AlertPresenter($alert)
- $vehicleMatches = $alertP->blacklistVehicleMatches

#alert-view
  .page-header
    .row.clearfix
      .span8
        %h2
          = t('Alert - Event detail')
      - if(Yii::app()->user->checkAccess('export_pdf'))
        .span2.pull-right.text-right
          %a.btn(href="#{Yii::app()->createAbsoluteUrl('alert/exportPdf', array('id' => $alert->id))}" target='_blank' )
            = t('Export')

  .row
    .span4
      - if(Yii::app()->user->checkAccess('media_view_video'))
        -if(!empty($event->video_file_name))
          %center
            -$this->renderVideo($event->getVideoUrl(), 350)
      #etalage-container(data-behavior="MediaEtalage")
        %ul#etalage
          - if(Yii::app()->user->checkAccess('media_view_photo'))
            - foreach ($event->photosUrl as $url)
              %li
                %a(href="#{$url}")
                  %img.etalage_source_image(src="#{$url}" alt="")

    .span8
      #event-data(data-behavior='nuclearifyAlertView' data-alert-id="#{$alert->id}")
        .row
          - $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', |
            array(                                                       |
              'type' => 'horizontal',                                    |
              'action' => array('/alert/update/'.$alert->id),            |
              'htmlOptions' => array('id' => 'alert-form'),              |
            ))                                                           |

          .span4
            %fieldset
              - if(isset($editEnable) && $editEnable)
                - $this->renderPartial('/alert/_vehicleTraceDetails', array('event' => $event, 'form' => $form))
              - else
                - $this->renderPartial('/alert/_vehicleTraceDetails', array('event' => $event))
          .span4
            %fieldset
              - if(isset($editEnable) && $editEnable)
                - $this->renderPartial('/alert/_alertDetails', array('alert' => $alert, 'form' => $form))
              - else
                - $this->renderPartial('/alert/_alertDetails', array('alert' => $alert))
           
            - if(sizeof($vehicleMatches) > 0)
              .blacklist-links
                %h4=t("Blacklist matches")
                .span
                  -foreach($vehicleMatches as $vehicleMatch)
                    %a(href="#{$this->createUrl('PlateAuthorization/viewByVehicle', array('id'=>$vehicleMatch))}" target="_blank") ="#{$vehicleMatch}"
                    %br 
        .row
          - if(user()->checkAccess('alert_take_charge'))
            .span8.text-right
              %fieldset
                - if(isset($editEnable) && $editEnable)
                  %button#save-alert.btn(type="submit" data-confirm-text="#{t('Confirm')}")= t('Save & Close')
                - else if(!$alert->isManaged())
                  %button#take-charge.btn(type="button" data-confirm-text="#{t('Confirm')}")= t('Take Charge')

        - $this->endWidget()

        %form#take-charge-form.hidden(action="#{$this->createUrl('alert/takeCharge', array('id'=>$alert->id))}" method="POST")
  
  #overlay
    #modal-image  