<div class="rounded border border-gray p-2 mt-3">
  <table class="table table-bordered table-striped">
    <tr class="text-center">
      <th style="width: 120px">서비스정보</th>
      <th>서버</th>
      <th style="width: 600px">서비스 비고</th>
      <th style="width: 200px">결제처리</th>
    </tr>
    <?php foreach ($serviceCellDatas['entities'] as $entity): ?>
      <?php $serviceCellDatas['entity'] = $entity ?>
      <tr class="text-left">
        <td class="text-center">
          <div><?= $entity->getTitle() ?></div>
          <div><?= $serviceCellDatas['service']->getHelper()->getFieldView('site', $entity->getSite(), $serviceCellDatas) ?></div>
          <div><?= $serviceCellDatas['service']->getHelper()->getFieldView('location', $entity->getLocation(), $serviceCellDatas) ?></div>
          <div class="mt-3"><?= $serviceCellDatas['service']->getHelper()->getListButton('addServer', '대체서버 입력', ['entity' => $entity], ['class' => 'btn btn-sm btn-primary']) ?></div>
        </td>
        <td class="text-center" nowrap><?= view('cells/service/server', ['serviceEntity' => $entity, 'serverEntities' => $serviceCellDatas['childServers'][$entity->getPK()]]) ?></td>
        <td class="text-center" nowrap>
          <?= form_open("/admin/customer/service/history/{$entity->getPK()}?return_url=" . urlencode(current_url()), ['method' => "post"]) ?>
          <textarea name="history" class="form-control note-box"><?= $entity->getHistory() ?></textarea>
          <?= form_submit('', '저장', array("class" => "btn btn-outline btn-primary m-3")); ?>
          <?= form_close() ?>
        </td>
        <td><?= view('cells/service/payment', ['serviceEntity' => $entity]) ?></td>
      </tr>
    <?php endforeach; ?>
  </table>
</div>