2017-11-20 00:10:04 -05:00
|
|
|
{{ define "title"}}{{ t "Users" }}{{ end }}
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
<section class="page-header">
|
|
|
|
<h1>{{ t "Users" }}</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>
|
2017-11-20 00:10:04 -05:00
|
|
|
<li>
|
|
|
|
<a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="{{ route "createUser" }}">{{ t "Add user" }}</a>
|
|
|
|
</li>
|
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>
|
|
|
|
|
|
|
|
{{ if eq (len .users) 1 }}
|
|
|
|
<p class="alert">{{ t "You are the only user." }}</p>
|
|
|
|
{{ else }}
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th class="column-20">{{ t "Username" }}</th>
|
|
|
|
<th>{{ t "Administrator" }}</th>
|
|
|
|
<th>{{ t "Last Login" }}</th>
|
|
|
|
<th>{{ t "Actions" }}</th>
|
|
|
|
</tr>
|
|
|
|
{{ range .users }}
|
|
|
|
{{ if ne .ID $.user.ID }}
|
|
|
|
<tr>
|
|
|
|
<td>{{ .Username }}</td>
|
|
|
|
<td>{{ if eq .IsAdmin true }}{{ t "Yes" }}{{ else }}{{ t "No" }}{{ end }}</td>
|
|
|
|
<td>
|
|
|
|
{{ if .LastLoginAt }}
|
2018-02-04 17:37:42 -05:00
|
|
|
<time datetime="{{ isodate .LastLoginAt }}" title="{{ isodate .LastLoginAt }}">{{ elapsed $.user.Timezone .LastLoginAt }}</time>
|
2017-11-20 00:10:04 -05:00
|
|
|
{{ else }}
|
|
|
|
{{ t "Never" }}
|
|
|
|
{{ end }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href="{{ route "editUser" "userID" .ID }}">{{ t "Edit" }}</a>,
|
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 "removeUser" "userID" .ID }}">{{ t "Remove" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</table>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ end }}
|