<?php $serviceStart = DateHelper::formatLong($service->start_time); ?>
<?php $serviceExpectedStop = DateHelper::formatLong($service->expected_end_time); ?>
<div class="service-content alert alert-block alert-normal">
  <h4>
    <?php echo htmlspecialchars(Yii::t('app', 'Gate Group'),ENT_QUOTES,'UTF-8'); ?>
    <?php echo htmlspecialchars("#$gateGroup->ID".":",ENT_QUOTES,'UTF-8'); ?>
    <?php echo htmlspecialchars("$gateGroup->name",ENT_QUOTES,'UTF-8'); ?>
  </h4>
  <p><?php echo htmlspecialchars(Yii::t('app', 'Task started at: {service-start}. Planned stop at: {service-expected-stop}.', array('{service-start}' => $serviceStart, '{service-expected-stop}' => $serviceExpectedStop)),ENT_QUOTES,'UTF-8'); ?></p>
  <?php if(Yii::app()->user->checkAccess('start_stop_service')) { ?>
    <div class="service-actions">
      <button <?php echo MtHaml\Runtime::renderAttributes(array(array('class', ('btn' . ' ' . 'btn-danger' . ' ' . 'btn-large')), array('type', 'button'), array('data-service-id', ($service->ID)), array('data-service-action', 'stop')), 'html5', 'UTF-8'); ?>>
        <?php echo htmlspecialchars(Yii::t('app', 'Stop Service'),ENT_QUOTES,'UTF-8'); ?>
      </button>
    </div>
  <?php } ?>
</div>
