<?php
// Generic entity card
// Vars: $row, $labels

function label_for($k, $labels) {
  return $labels[$k] ?? $k;
}
?>

<div class='box'>
  <table class='table' style='border:none'>
    <tbody>
      <?php foreach (($row ?? []) as $k => $v): ?>
        <?php if ($k === 'id') continue; ?>
        <tr>
          <th style='width:220px;background:transparent;border-bottom:1px solid #eef2f7'><?= e(label_for($k, $labels ?? [])) ?></th>
          <td style='border-bottom:1px solid #eef2f7'><?= e((string)$v) ?></td>
        </tr>
      <?php endforeach; ?>
    </tbody>
  </table>
</div>
