1
0
Fork 0
miniflux/template/html/users.html

53 lines
1.9 KiB
HTML
Raw Normal View History

{{ define "title"}}{{ t "page.users.title" }}{{ end }}
2017-11-20 00:10:04 -05:00
{{ define "content"}}
<section class="page-header">
<h1>{{ t "page.users.title" }}</h1>
2019-11-17 20:26:47 -05:00
{{ template "settings_menu" dict "user" .user }}
2017-11-20 00:10:04 -05:00
</section>
{{ if eq (len .users) 1 }}
<p class="alert">{{ t "alert.no_user" }}</p>
2017-11-20 00:10:04 -05:00
{{ else }}
<table>
<tr>
2018-09-22 13:39:33 -04:00
<th class="column-20">{{ t "page.users.username" }}</th>
<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>
<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 }}
<time datetime="{{ isodate .LastLoginAt }}" title="{{ isodate .LastLoginAt }}">{{ elapsed $.user.Timezone .LastLoginAt }}</time>
2017-11-20 00:10:04 -05:00
{{ else }}
{{ t "page.users.never_logged" }}
2017-11-20 00:10:04 -05:00
{{ end }}
</td>
<td>
<a href="{{ route "editUser" "userID" .ID }}">{{ t "action.edit" }}</a>,
<a href="#"
data-confirm="true"
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>
2020-03-01 20:38:29 -05:00
<br>
2017-11-20 00:10:04 -05:00
{{ end }}
2020-03-01 20:38:29 -05:00
<p>
<a href="{{ route "createUser" }}" class="button button-primary">{{ t "menu.add_user" }}</a>
</p>
2017-11-20 00:10:04 -05:00
{{ end }}