<?php $lineColor = $alert->backGroundColor; ?>
<?php $signList = $alert->speedLimitSignList;; ?>
<tr <?php echo MtHaml\Runtime::renderAttributes(array(array('id', ('eventreporting-' . ($alert->id))), array('style', ('background-color:#' . (((isset($lineColor))? $lineColor:'') )))), 'html5', 'UTF-8'); ?>>
  <?php $this->renderPartial('/shared/_alertGenericColumns', array('alert' => $alert, 'signList' => $signList)); ?>
  <td>
    <?php if(user()->checkAccess('alert_take_charge')) { ?>
      <?php if($alert->isNew()) { ?>
        <button <?php echo MtHaml\Runtime::renderAttributes(array(array('class', ('take-charge' . ' ' . 'btn' . ' ' . 'btn-mini')), array('type', 'button'), array('data-eventreporting-id', ($alert->id)), array('data-confirm-text', (t('Confirm?')))), 'html5', 'UTF-8'); ?>>
          <?php echo htmlspecialchars(t('Take Charge'),ENT_QUOTES,'UTF-8'); ?>
        </button>
      <?php } else if($alert->isTakenInCharge()) { ?>
        <button <?php echo MtHaml\Runtime::renderAttributes(array(array('class', ('manage' . ' ' . 'btn' . ' ' . 'btn-mini')), array('type', 'button'), array('data-eventreporting-id', ($alert->id)), array('data-confirm-text', (t('Confirm?')))), 'html5', 'UTF-8'); ?>>
          <?php echo htmlspecialchars(t('Close'),ENT_QUOTES,'UTF-8'); ?>
        </button>
      <?php } else if($alert->isManaged()) { ?>
        <?php echo htmlspecialchars(t('Closed'),ENT_QUOTES,'UTF-8'); ?>
      <?php } ?>
    <?php } ?>
  </td>
  <td>
    <a <?php echo MtHaml\Runtime::renderAttributes(array(array('class', ('btn' . ' ' . 'btn-mini')), array('data-event-reporting-id', ($alert->id)), array('href', (Yii::app()->createUrl("alert/view", array('id' => $alert->id)))), array('target', '_blank')), 'html5', 'UTF-8'); ?>><?php echo htmlspecialchars(t('View'),ENT_QUOTES,'UTF-8'); ?></a>
    <?php if(user()->checkAccess('alert_delete')) { ?>
      <a <?php echo MtHaml\Runtime::renderAttributes(array(array('class', 'icon-trash'), array('href', (url('alert/delete',array('id'=>$alert->id, 'returnUrl'=>ctrl()->getPageLink())))), array('onclick', ('return confirm(\'' . (t('Confirm?')) . '\');'))), 'html5', 'UTF-8'); ?>></a>
    <?php } ?>
  </td>
  <td>
    <?php $this->renderPartial('/shared/_bookmarkIcon', array('hasBookmark'=>$alert->bookmark, 'id_reference' => $alert->id, 'type' => Bookmark::TYPE_ALERT)); ?>
  </td>
</tr>
