sessions.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {{ define "title"}}{{ t "Sessions" }}{{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1>{{ t "Sessions" }}</h1>
  5. <ul>
  6. <li>
  7. <a href="{{ route "settings" }}">{{ t "Settings" }}</a>
  8. </li>
  9. <li>
  10. <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
  11. </li>
  12. <li>
  13. <a href="{{ route "users" }}">{{ t "Users" }}</a>
  14. </li>
  15. <li>
  16. <a href="{{ route "createUser" }}">{{ t "Add user" }}</a>
  17. </li>
  18. </ul>
  19. </section>
  20. <table>
  21. <tr>
  22. <th>{{ t "Date" }}</th>
  23. <th>{{ t "IP Address" }}</th>
  24. <th>{{ t "User Agent" }}</th>
  25. <th>{{ t "Actions" }}</th>
  26. </tr>
  27. {{ range .sessions }}
  28. <tr {{ if eq .Token $.currentSessionToken }}class="row-highlighted"{{ end }}>
  29. <td class="column-20" title="{{ isodate .CreatedAt }}">{{ elapsed .CreatedAt }}</td>
  30. <td class="column-20" title="{{ .IP }}">{{ .IP }}</td>
  31. <td title="{{ .UserAgent }}">{{ .UserAgent }}</td>
  32. <td class="column-20">
  33. {{ if eq .Token $.currentSessionToken }}
  34. {{ t "Current session" }}
  35. {{ else }}
  36. <a href="#"
  37. data-confirm="true"
  38. data-label-question="{{ t "Are you sure?" }}"
  39. data-label-yes="{{ t "yes" }}"
  40. data-label-no="{{ t "no" }}"
  41. data-label-loading="{{ t "Work in progress..." }}"
  42. data-url="{{ route "removeSession" "sessionID" .ID }}">{{ t "Remove" }}</a>
  43. {{ end }}
  44. </td>
  45. </tr>
  46. {{ end }}
  47. </table>
  48. {{ end }}