- $alertPresenter = new AlertPresenter($alert)

%h3
  %span
    != $alertPresenter->getLevelIcon()
  %span
    = t('Alert')
    = '#'
    = $alertPresenter->id
    -if(user()->checkAccess('alert_delete'))
      %a.icon-trash(href="#{url('alert/delete',array('id'=>$alert->id))}" onclick="return confirm('#{t('Confirm?')}');")
  %span
    - $this->renderPartial('/shared/_bookmarkIcon', array('hasBookmark'=>$alert->bookmark, 'id_reference' => $alert->id, 'type' => Bookmark::TYPE_ALERT))
   

%table.table.table-striped.table-condensed
  %tbody
    %tr
      %td
        =t('Description')
      %td
        =t($alert->description)
    %tr
      %td
        =t('Note')
      %td
        - $this->renderPartial('/shared/_alertNote', array('alert' => $alertPresenter))
    %tr
      %td
        =t('Action')
      %td
        =$alertPresenter->action
    %tr
      %td
        =t('Status')
      %td
        - if($alert->isNew())
          = t('To be managed')
        - else if($alert->isTakenInCharge())
          = t('Taken in charge')
        - else if($alert->isManaged())
          = t('Managed')
    - if($alert->isTakenInCharge() || $alert->isManaged())
      %tr
        %td
          =t('Taken in charge by')
        %td
          = $alert->takenInChargeOperator->username
          %p
            = t('at')
            = DateHelper::formatLocalDate($alert->taken_in_charge_time)
            = DateHelper::formatISO9075Time($alert->taken_in_charge_time)
    - if($alert->isManaged())
      %tr
        %td
          =t('Managed by')
        %td
          = $alert->managedByOperator->username
          %p
            = t('at')
            = DateHelper::formatLocalDate($alert->managed_time)
            = DateHelper::formatISO9075Time($alert->managed_time)

    %tr
      %td
        =t('Comment')
      %td
        .comment-field
          - if(isset($form))
            != $form->textFieldRow($alert, 'comment', array( 'labelOptions' => array('label' => false)))
          - else
            =t($alertPresenter->getComment())

