| 1 |
{{ define "title"}}{{ t "page.sessions.title" }}{{ end }} |
| 2 |
|
| 3 |
{{ define "page_header"}} |
| 4 |
<section class="page-header" aria-labelledby="page-header-title"> |
| 5 |
<h1 id="page-header-title">{{ t "page.sessions.title" }}</h1> |
| 6 |
{{ template "settings_menu" dict "user" .user }} |
| 7 |
</section> |
| 8 |
{{ end }} |
| 9 |
|
| 10 |
{{ define "content"}} |
| 11 |
<table> |
| 12 |
<tr> |
| 13 |
<th>{{ t "page.sessions.table.date" }}</th> |
| 14 |
<th>{{ t "page.sessions.table.ip" }}</th> |
| 15 |
<th>{{ t "page.sessions.table.user_agent" }}</th> |
| 16 |
<th>{{ t "page.sessions.table.actions" }}</th> |
| 17 |
</tr> |
| 18 |
{{ range .sessions }} |
| 19 |
<tr {{ if eq .ID $.currentSessionID }}class="row-highlighted"{{ end }}> |
| 20 |
<td class="column-20" title="{{ isodate .CreatedAt }}">{{ elapsed $.user.Timezone .CreatedAt }}</td> |
| 21 |
<td class="column-20" title="{{ .IP }}">{{ .IP }}</td> |
| 22 |
<td title="{{ .UserAgent }}">{{ .UserAgent }}</td> |
| 23 |
<td class="column-20"> |
| 24 |
{{ if eq .ID $.currentSessionID }} |
| 25 |
{{ t "page.sessions.table.current_session" }} |
| 26 |
{{ else }} |
| 27 |
<a href="#" |
| 28 |
data-confirm="true" |
| 29 |
data-label-question="{{ t "confirm.question" }}" |
| 30 |
data-label-yes="{{ t "confirm.yes" }}" |
| 31 |
data-label-no="{{ t "confirm.no" }}" |
| 32 |
data-label-loading="{{ t "confirm.loading" }}" |
| 33 |
data-url="{{ routePath "/sessions/%s/remove" .ID }}">{{ icon "delete" }}{{ t "action.remove" }}</a> |
| 34 |
{{ end }} |
| 35 |
</td> |
| 36 |
</tr> |
| 37 |
{{ end }} |
| 38 |
</table> |
| 39 |
|
| 40 |
{{ end }} |