2018-09-22 03:53:29 +02:00
|
|
|
{{ define "title"}}{{ t "page.users.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.users.title" }}</h1>
|
2019-11-18 02:26:47 +01:00
|
|
|
{{ template "settings_menu" dict "user" .user }}
|
2017-11-20 06:10:04 +01:00
|
|
|
</section>
|
|
|
|
|
|
|
|
{{ if eq (len .users) 1 }}
|
2018-09-22 03:53:29 +02:00
|
|
|
<p class="alert">{{ t "alert.no_user" }}</p>
|
2017-11-20 06:10:04 +01:00
|
|
|
{{ else }}
|
|
|
|
<table>
|
|
|
|
<tr>
|
2018-09-22 19:39:33 +02:00
|
|
|
<th class="column-20">{{ t "page.users.username" }}</th>
|
2018-09-22 03:53:29 +02:00
|
|
|
<th>{{ t "page.users.is_admin" }}</th>
|
|
|
|
<th>{{ t "page.users.last_login" }}</th>
|
|
|
|
<th>{{ t "page.users.actions" }}</th>
|
2017-11-20 06:10:04 +01:00
|
|
|
</tr>
|
|
|
|
{{ range .users }}
|
|
|
|
{{ if ne .ID $.user.ID }}
|
|
|
|
<tr>
|
|
|
|
<td>{{ .Username }}</td>
|
2018-09-22 03:53:29 +02:00
|
|
|
<td>{{ if eq .IsAdmin true }}{{ t "page.users.admin.yes" }}{{ else }}{{ t "page.users.admin.no" }}{{ end }}</td>
|
2017-11-20 06:10:04 +01:00
|
|
|
<td>
|
|
|
|
{{ if .LastLoginAt }}
|
2018-02-04 23:37:42 +01:00
|
|
|
<time datetime="{{ isodate .LastLoginAt }}" title="{{ isodate .LastLoginAt }}">{{ elapsed $.user.Timezone .LastLoginAt }}</time>
|
2017-11-20 06:10:04 +01:00
|
|
|
{{ else }}
|
2018-09-22 03:53:29 +02:00
|
|
|
{{ t "page.users.never_logged" }}
|
2017-11-20 06:10:04 +01:00
|
|
|
{{ end }}
|
|
|
|
</td>
|
|
|
|
<td>
|
2018-09-22 03:53:29 +02:00
|
|
|
<a href="{{ route "editUser" "userID" .ID }}">{{ t "action.edit" }}</a>,
|
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 "removeUser" "userID" .ID }}">{{ t "action.remove" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</table>
|
2020-03-02 02:38:29 +01:00
|
|
|
<br>
|
2017-11-20 06:10:04 +01:00
|
|
|
{{ end }}
|
|
|
|
|
2020-03-02 02:38:29 +01:00
|
|
|
<p>
|
|
|
|
<a href="{{ route "createUser" }}" class="button button-primary">{{ t "menu.add_user" }}</a>
|
|
|
|
</p>
|
|
|
|
|
2017-11-20 06:10:04 +01:00
|
|
|
{{ end }}
|