miniflux/template/html/users.html

64 lines
2.3 KiB
HTML
Raw Normal View History

{{ define "title"}}{{ t "page.users.title" }}{{ end }}
2017-11-20 06:10:04 +01:00
{{ define "content"}}
<section class="page-header">
<h1>{{ t "page.users.title" }}</h1>
2017-11-20 06:10:04 +01:00
<ul>
<li>
<a href="{{ route "settings" }}">{{ t "menu.settings" }}</a>
2017-11-20 06:10:04 +01:00
</li>
2017-11-22 04:37:47 +01:00
<li>
<a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
2017-11-22 04:37:47 +01:00
</li>
2017-11-20 06:10:04 +01:00
<li>
<a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
2017-11-20 06:10:04 +01:00
</li>
<li>
<a href="{{ route "createUser" }}">{{ t "menu.add_user" }}</a>
2017-11-20 06:10:04 +01:00
</li>
2018-02-01 07:03:21 +01:00
<li>
<a href="{{ route "about" }}">{{ t "menu.about" }}</a>
2018-02-01 07:03:21 +01:00
</li>
2017-11-20 06:10:04 +01:00
</ul>
</section>
{{ if eq (len .users) 1 }}
<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>
<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>
<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 }}
<time datetime="{{ isodate .LastLoginAt }}" title="{{ isodate .LastLoginAt }}">{{ elapsed $.user.Timezone .LastLoginAt }}</time>
2017-11-20 06:10:04 +01:00
{{ else }}
{{ t "page.users.never_logged" }}
2017-11-20 06:10:04 +01: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 06:10:04 +01:00
</td>
</tr>
{{ end }}
{{ end }}
</table>
{{ end }}
{{ end }}