table.hbs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <table id="domains-table" hx-swap-oob="true">
  2. <thead>
  3. <tr>
  4. <th class="domain">Domain</th>
  5. <th class="homepage">Homepage</th>
  6. <th class="actions"></th>
  7. </tr>
  8. </thead>
  9. <tbody>
  10. {{#if domains}}
  11. {{#each domains}}
  12. <tr>
  13. <td class="domain">
  14. {{address}}
  15. </td>
  16. <td class="homepage">
  17. {{#if homepage}}
  18. {{homepage}}
  19. {{else}}
  20. {{@root.default_domain}}
  21. {{/if}}
  22. </td>
  23. <td class="actions">
  24. <button
  25. type="button"
  26. class="action delete"
  27. hx-on:click='openDialog("domain-dialog")'
  28. hx-get="/confirm-domain-delete"
  29. hx-target="#domain-dialog .content-wrapper"
  30. hx-indicator="#domain-dialog"
  31. hx-vals='{"id":"{{id}}"}'
  32. >
  33. {{> icons/trash}}
  34. </button>
  35. </td>
  36. </tr>
  37. {{/each}}
  38. {{else}}
  39. <tr>
  40. <td class="no-entry">
  41. No domains yet.
  42. </td>
  43. </tr>
  44. {{/if}}
  45. </tbody>
  46. </table>