2018-09-21 21:53:29 -04:00
|
|
|
{{ define "title"}}{{ t "page.users.title" }}{{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
<section class="page-header">
|
2018-09-21 21:53:29 -04:00
|
|
|
<h1>{{ t "page.users.title" }}</h1>
|
2017-11-20 00:10:04 -05:00
|
|
|
<ul>
|
|
|
|
<li>
|
2018-09-21 21:53:29 -04:00
|
|
|
<a href="{{ route "settings" }}">{{ t "menu.settings" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
2017-11-21 22:37:47 -05:00
|
|
|
<li>
|
2018-09-21 21:53:29 -04:00
|
|
|
<a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
|
2017-11-21 22:37:47 -05:00
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
<li>
|
2018-09-21 21:53:29 -04:00
|
|
|
<a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
|
|
|
<li>
|
2018-09-21 21:53:29 -04:00
|
|
|
<a href="{{ route "createUser" }}">{{ t "menu.add_user" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
2018-02-01 01:03:21 -05:00
|
|
|
<li>
|
2018-09-21 21:53:29 -04:00
|
|
|
<a href="{{ route "about" }}">{{ t "menu.about" }}</a>
|
2018-02-01 01:03:21 -05:00
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{{ if eq (len .users) 1 }}
|
2018-09-21 21:53:29 -04:00
|
|
|
<p class="alert">{{ t "alert.no_user" }}</p>
|
2017-11-20 00:10:04 -05:00
|
|
|
{{ else }}
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th class="column-20">{{ t "Username" }}</th>
|
2018-09-21 21:53:29 -04:00
|
|
|
<th>{{ t "page.users.is_admin" }}</th>
|
|
|
|
<th>{{ t "page.users.last_login" }}</th>
|
|
|
|
<th>{{ t "page.users.actions" }}</th>
|
2017-11-20 00:10:04 -05:00
|
|
|
</tr>
|
|
|
|
{{ range .users }}
|
|
|
|
{{ if ne .ID $.user.ID }}
|
|
|
|
<tr>
|
|
|
|
<td>{{ .Username }}</td>
|
2018-09-21 21:53:29 -04:00
|
|
|
<td>{{ if eq .IsAdmin true }}{{ t "page.users.admin.yes" }}{{ else }}{{ t "page.users.admin.no" }}{{ end }}</td>
|
2017-11-20 00:10:04 -05:00
|
|
|
<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 }}
|
2018-09-21 21:53:29 -04:00
|
|
|
{{ t "page.users.never_logged" }}
|
2017-11-20 00:10:04 -05:00
|
|
|
{{ end }}
|
|
|
|
</td>
|
|
|
|
<td>
|
2018-09-21 21:53:29 -04:00
|
|
|
<a href="{{ route "editUser" "userID" .ID }}">{{ t "action.edit" }}</a>,
|
2017-11-21 17:44:47 -05:00
|
|
|
<a href="#"
|
|
|
|
data-confirm="true"
|
2018-09-21 21:53:29 -04: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 "removeUser" "userID" .ID }}">{{ t "action.remove" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</table>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ end }}
|