#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
    .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'),              |
            ))                                                           |


          .span5
            %fieldset
              - if(isset($editEnable) && $editEnable)
                - $this->renderPartial('/alert/_alertDetails', array('alert' => $alert, 'form' => $form))
              - else
                - $this->renderPartial('/alert/_alertDetails', array('alert' => $alert))
        .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")
