2018-09-22 03:53:29 +02:00
|
|
|
{{ define "title"}}{{ t "page.sessions.title" }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
<h1>{{ t "page.sessions.title" }}</h1>
|
2017-11-20 06:10:04 +01:00
|
|
|
<ul>
|
|
|
|
<li>
|
2018-09-22 03:53:29 +02:00
|
|
|
<a href="{{ route "settings" }}">{{ t "menu.settings" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
</li>
|
2017-11-22 04:37:47 +01:00
|
|
|
<li>
|
2018-09-22 03:53:29 +02:00
|
|
|
<a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
|
2017-11-22 04:37:47 +01:00
|
|
|
</li>
|
2018-01-06 03:07:15 +01:00
|
|
|
{{ if .user.IsAdmin }}
|
2017-11-20 06:10:04 +01:00
|
|
|
<li>
|
2018-09-22 03:53:29 +02:00
|
|
|
<a href="{{ route "users" }}">{{ t "menu.users" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
</li>
|
|
|
|
<li>
|
2018-09-22 03:53:29 +02:00
|
|
|
<a href="{{ route "createUser" }}">{{ t "menu.add_user" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
</li>
|
2018-01-06 03:07:15 +01:00
|
|
|
{{ end }}
|
2018-02-01 07:03:21 +01:00
|
|
|
<li>
|
2018-09-22 03:53:29 +02:00
|
|
|
<a href="{{ route "about" }}">{{ t "menu.about" }}</a>
|
2018-02-01 07:03:21 +01:00
|
|
|
</li>
|
2017-11-20 06:10:04 +01:00
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
|
2017-11-21 23:44:47 +01:00
|
|
|
<table>
|
2017-11-20 06:10:04 +01:00
|
|
|
<tr>
|
2018-09-22 03:53:29 +02:00
|
|
|
<th>{{ t "page.sessions.table.date" }}</th>
|
|
|
|
<th>{{ t "page.sessions.table.ip" }}</th>
|
|
|
|
<th>{{ t "page.sessions.table.user_agent" }}</th>
|
|
|
|
<th>{{ t "page.sessions.table.actions" }}</th>
|
2017-11-20 06:10:04 +01:00
|
|
|
</tr>
|
|
|
|
{{ range .sessions }}
|
|
|
|
<tr {{ if eq .Token $.currentSessionToken }}class="row-highlighted"{{ end }}>
|
2018-02-04 23:37:42 +01:00
|
|
|
<td class="column-20" title="{{ isodate .CreatedAt }}">{{ elapsed $.user.Timezone .CreatedAt }}</td>
|
2017-11-20 06:10:04 +01:00
|
|
|
<td class="column-20" title="{{ .IP }}">{{ .IP }}</td>
|
|
|
|
<td title="{{ .UserAgent }}">{{ .UserAgent }}</td>
|
|
|
|
<td class="column-20">
|
|
|
|
{{ if eq .Token $.currentSessionToken }}
|
2018-09-22 03:53:29 +02:00
|
|
|
{{ t "page.sessions.table.current_session" }}
|
2017-11-20 06:10:04 +01:00
|
|
|
{{ else }}
|
2017-11-21 23:44:47 +01:00
|
|
|
<a href="#"
|
|
|
|
data-confirm="true"
|
2018-09-22 03:53:29 +02:00
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
|
|
|
data-url="{{ route "removeSession" "sessionID" .ID }}">{{ t "action.remove" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
{{ end }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
{{ end }}
|