-$nationality = $event->custom_nationality
-if (isEmpty ( $nationality ))
  -if (paramdeep ( 'events', 'nationality', 'default' ) !== false)
    -$nationality = paramdeep ( 'events', 'nationality', 'default' );

- $isWhitelist = false
- foreach ($event->gate->gateBehavior as $index => $gateBehavior)
  -if($gateBehavior->is_whitelist)
    - $isWhitelist = true
    
#alert-view
  .page-header
    .row.clearfix
      .span8
        %h2
          = t('Event detail')
      .span2.pull-right.text-right
        %a.btn(href="#{Yii::app()->createAbsoluteUrl('alert/ExportPdfEvent', array('id' => $event->ID))}" target='_blank' )
          = t('Export')

  .row
    .span4
      #videos
        - if(Yii::app()->user->checkAccess('media_view_video'))
          - foreach($event->videos as $video)
            -$this->renderVideo($video->url,370)
    
      #etalage-container(data-behavior="MediaEtalage")
        - if(Yii::app()->user->checkAccess('media_view_photo'))
          %ul#etalage
            - foreach ($event->photos as $photo)
              %li
                - if (!Yii::app()->user->checkAccess('edit_event_behaviors'))
                  -if(paramdeep('media','enableEnhancedMode'))
                    - $footer = $photo->getFooterRectangle()
                    - if (isset($footer))
                      .footer(data-rect-top="#{$footer->topLeft->y}" data-rect-left="#{$footer->topLeft->x}" data-rect-height="#{$footer->height}" data-rect-width="#{$footer->width}" data-image-height="#{$photo->height}" data-image-width="#{$photo->width}")
                    - $plate = $photo->getPlateRectangle()
                    - if (isset($plate))
                      .plate(data-rect-top="#{$plate->topLeft->y}" data-rect-left="#{$plate->topLeft->x}" data-rect-height="#{$plate->height}" data-rect-width="#{$plate->width}" data-image-height="#{$photo->height}" data-image-width="#{$photo->width}" data-plate-hide="0")
                    
                    - $areas = $photo->getExtraAreas()
                    - if (isset($areas) && count($areas) > 0)    
                      .extra-areas  
                        - foreach($areas as $areaType => $areaGroup)
                          - foreach($areaGroup as $area)
                            .extra-area(data-type="#{$areaType}" data-rect-top="#{$area->topLeft->y}" data-rect-left="#{$area->topLeft->x}" data-rect-height="#{$area->height}" data-rect-width="#{$area->width}" data-image-height="#{$photo->height}" data-image-width="#{$photo->width}" data-plate-hide="0" data-border-color="#{ImageAreaHelper::getAreaColor($areaType)}")
                
                %a(href="#{$photo->url}")
                  %img.etalage_source_image(src="#{$photo->url}")


    .span8
      #event-data.span8
        .row
          .span4
            %fieldset
              - $this->renderPartial('/alert/_eventDetails', array('event' => $event))
          .span4
            %fieldset
              -if( user()->checkAccess('show_event_violation_document'))
                - $this->renderPartial('/alert/violationsList', array('event' => $event))
        
        -if($isWhitelist)
          .row
            .span8
              - $this->renderPartial("/event/_eventBehavior_WhiteList_SmartTips", $varsForWL)
              