tr.hbs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <tr id="tr-{{id}}" {{#if swap_oob}}hx-swap-oob="true"{{/if}}>
  2. <td class="domains-id">
  3. {{id}}
  4. </td>
  5. <td class="domains-address right-fade">
  6. {{address}}
  7. <p class="description">
  8. by&nbsp;
  9. {{~#if user_id~}}
  10. <a
  11. aria-label="View user"
  12. data-tooltip="View user"
  13. hx-get="/api/users/admin"
  14. hx-target="closest table"
  15. hx-swap="outerHTML"
  16. hx-sync="this:replace"
  17. hx-indicator="closest table"
  18. hx-vals='{"search":"{{email}}"}'
  19. onclick="setTab(event, 'tab-links')"
  20. >
  21. {{email}}
  22. </a>
  23. {{#ifEquals @root.query.user email}}
  24. {{else}}
  25. &nbsp;(
  26. <a
  27. aria-label="View domains"
  28. data-tooltip="View domains"
  29. hx-get="/api/domains/admin"
  30. hx-target="closest table"
  31. hx-swap="outerHTML"
  32. hx-sync="this:replace"
  33. hx-indicator="closest table"
  34. hx-vals='{"user":"{{email}}"}'
  35. >
  36. view domains
  37. </a>)
  38. {{/ifEquals}}
  39. {{~else~}}
  40. <a
  41. aria-label="View system domains"
  42. data-tooltip="View system domains"
  43. hx-get="/api/domains/admin"
  44. hx-target="closest table"
  45. hx-swap="outerHTML"
  46. hx-sync="this:replace"
  47. hx-indicator="closest table"
  48. hx-vals='{"owner":"false"}'
  49. >
  50. System
  51. </a>
  52. {{~/if~}}
  53. &nbsp;{{~#if description~}}· {{description}}{{~/if}}
  54. </p>
  55. </td>
  56. <td class="domains-homepage right-fade">
  57. {{#if homepage}}
  58. <a href="{{homepage}}" target="_blank" rel="noopener noreferrer">
  59. {{homepage}}
  60. </a>
  61. {{else}}
  62. No homepage
  63. {{/if}}
  64. </td>
  65. <td class="domains-created-at">
  66. {{relative_created_at}}
  67. </td>
  68. <td class="domains-links-count">
  69. {{#ifEquals links_count '0'}}
  70. {{links_count}}
  71. {{else}}
  72. <a
  73. data-tooltip="View links"
  74. aria-label="View links"
  75. hx-get="/api/links/admin"
  76. hx-target="closest table"
  77. hx-swap="outerHTML"
  78. hx-sync="this:replace"
  79. hx-vals='{"domain":"{{address}}"}'
  80. hx-indicator="closest table"
  81. onclick="setTab(event, 'tab-links')"
  82. >
  83. {{links_count}}
  84. </a>
  85. {{/ifEquals}}
  86. </td>
  87. {{> admin/domains/actions}}
  88. </tr>
  89. <tr class="edit">
  90. <td class="loading">
  91. {{> icons/spinner}}
  92. </td>
  93. </tr>