table.hbs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. class="action delete"
  26. hx-on:click='openDialog("domain-dialog")'
  27. hx-get="/confirm-domain-delete"
  28. hx-target="#domain-dialog .content-wrapper"
  29. hx-indicator="#domain-dialog"
  30. hx-vals='{"id":"{{id}}"}'
  31. >
  32. {{> icons/trash}}
  33. </button>
  34. </td>
  35. </tr>
  36. {{/each}}
  37. {{else}}
  38. <tr>
  39. <td class="no-entry">
  40. No domains yet.
  41. </td>
  42. </tr>
  43. {{/if}}
  44. </tbody>
  45. </table>