mirror of
https://github.com/miniflux/v2.git
synced 2025-07-22 17:18:37 +00:00
Refactor packages to have more idiomatic code base
This commit is contained in:
parent
c39f2e1a8d
commit
320d1b0167
109 changed files with 449 additions and 402 deletions
60
template/html/users.html
Normal file
60
template/html/users.html
Normal file
|
@ -0,0 +1,60 @@
|
|||
{{ define "title"}}{{ t "Users" }}{{ end }}
|
||||
|
||||
{{ define "content"}}
|
||||
<section class="page-header">
|
||||
<h1>{{ t "Users" }}</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route "settings" }}">{{ t "Settings" }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route "createUser" }}">{{ t "Add user" }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
{{ if eq (len .users) 1 }}
|
||||
<p class="alert">{{ t "You are the only user." }}</p>
|
||||
{{ else }}
|
||||
<table>
|
||||
<tr>
|
||||
<th class="column-20">{{ t "Username" }}</th>
|
||||
<th>{{ t "Administrator" }}</th>
|
||||
<th>{{ t "Last Login" }}</th>
|
||||
<th>{{ t "Actions" }}</th>
|
||||
</tr>
|
||||
{{ range .users }}
|
||||
{{ if ne .ID $.user.ID }}
|
||||
<tr>
|
||||
<td>{{ .Username }}</td>
|
||||
<td>{{ if eq .IsAdmin true }}{{ t "Yes" }}{{ else }}{{ t "No" }}{{ end }}</td>
|
||||
<td>
|
||||
{{ if .LastLoginAt }}
|
||||
<time datetime="{{ isodate .LastLoginAt }}" title="{{ isodate .LastLoginAt }}">{{ elapsed .LastLoginAt }}</time>
|
||||
{{ else }}
|
||||
{{ t "Never" }}
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route "editUser" "userID" .ID }}">{{ t "Edit" }}</a>,
|
||||
<a href="#"
|
||||
data-confirm="true"
|
||||
data-label-question="{{ t "Are you sure?" }}"
|
||||
data-label-yes="{{ t "yes" }}"
|
||||
data-label-no="{{ t "no" }}"
|
||||
data-label-loading="{{ t "Work in progress..." }}"
|
||||
data-url="{{ route "removeUser" "userID" .ID }}">{{ t "Remove" }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</table>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue