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

64 lines
2.2 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>
2017-11-20 00:10:04 -05:00
<ul>
<li>
<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>
<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>
<a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
2017-11-20 00:10:04 -05:00
</li>
<li>
<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>
<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 }}
<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>
<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>
{{ end }}
{{ end }}