2017-11-20 00:10:04 -05:00
|
|
|
{{ define "title"}}{{ t "Sessions" }}{{ end }}
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
<section class="page-header">
|
|
|
|
<h1>{{ t "Sessions" }}</h1>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<a href="{{ route "settings" }}">{{ t "Settings" }}</a>
|
|
|
|
</li>
|
2017-11-21 22:37:47 -05:00
|
|
|
<li>
|
|
|
|
<a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
|
|
|
|
</li>
|
2018-01-05 21:07:15 -05:00
|
|
|
{{ if .user.IsAdmin }}
|
2017-11-20 00:10:04 -05:00
|
|
|
<li>
|
|
|
|
<a href="{{ route "users" }}">{{ t "Users" }}</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="{{ route "createUser" }}">{{ t "Add user" }}</a>
|
|
|
|
</li>
|
2018-01-05 21:07:15 -05:00
|
|
|
{{ end }}
|
2018-02-01 01:03:21 -05:00
|
|
|
<li>
|
|
|
|
<a href="{{ route "about" }}">{{ t "About" }}</a>
|
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
|
2017-11-21 17:44:47 -05:00
|
|
|
<table>
|
2017-11-20 00:10:04 -05:00
|
|
|
<tr>
|
|
|
|
<th>{{ t "Date" }}</th>
|
|
|
|
<th>{{ t "IP Address" }}</th>
|
|
|
|
<th>{{ t "User Agent" }}</th>
|
|
|
|
<th>{{ t "Actions" }}</th>
|
|
|
|
</tr>
|
|
|
|
{{ range .sessions }}
|
|
|
|
<tr {{ if eq .Token $.currentSessionToken }}class="row-highlighted"{{ end }}>
|
2018-02-04 17:37:42 -05:00
|
|
|
<td class="column-20" title="{{ isodate .CreatedAt }}">{{ elapsed $.user.Timezone .CreatedAt }}</td>
|
2017-11-20 00:10:04 -05:00
|
|
|
<td class="column-20" title="{{ .IP }}">{{ .IP }}</td>
|
|
|
|
<td title="{{ .UserAgent }}">{{ .UserAgent }}</td>
|
|
|
|
<td class="column-20">
|
|
|
|
{{ if eq .Token $.currentSessionToken }}
|
|
|
|
{{ t "Current session" }}
|
|
|
|
{{ else }}
|
2017-11-21 17:44:47 -05:00
|
|
|
<a href="#"
|
|
|
|
data-confirm="true"
|
|
|
|
data-label-question="{{ t "Are you sure?" }}"
|
|
|
|
data-label-yes="{{ t "yes" }}"
|
|
|
|
data-label-no="{{ t "no" }}"
|
|
|
|
data-label-loading="{{ t "Work in progress..." }}"
|
|
|
|
data-url="{{ route "removeSession" "sessionID" .ID }}">{{ t "Remove" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
{{ end }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
{{ end }}
|