1
0
Fork 0
miniflux/template/html/users.html
2018-09-21 22:23:23 -07:00

63 lines
2.2 KiB
HTML

{{ define "title"}}{{ t "page.users.title" }}{{ end }}
{{ define "content"}}
<section class="page-header">
<h1>{{ t "page.users.title" }}</h1>
<ul>
<li>
<a href="{{ route "settings" }}">{{ t "menu.settings" }}</a>
</li>
<li>
<a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
</li>
<li>
<a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
</li>
<li>
<a href="{{ route "createUser" }}">{{ t "menu.add_user" }}</a>
</li>
<li>
<a href="{{ route "about" }}">{{ t "menu.about" }}</a>
</li>
</ul>
</section>
{{ if eq (len .users) 1 }}
<p class="alert">{{ t "alert.no_user" }}</p>
{{ 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>
</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>
<td>
{{ if .LastLoginAt }}
<time datetime="{{ isodate .LastLoginAt }}" title="{{ isodate .LastLoginAt }}">{{ elapsed $.user.Timezone .LastLoginAt }}</time>
{{ else }}
{{ t "page.users.never_logged" }}
{{ 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>
</td>
</tr>
{{ end }}
{{ end }}
</table>
{{ end }}
{{ end }}