aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/template/html/users.html
diff options
context:
space:
mode:
Diffstat (limited to 'server/template/html/users.html')
-rw-r--r--server/template/html/users.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/server/template/html/users.html b/server/template/html/users.html
new file mode 100644
index 0000000..69acd00
--- /dev/null
+++ b/server/template/html/users.html
@@ -0,0 +1,51 @@
+{{ 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 "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="{{ route "removeUser" "userID" .ID }}">{{ t "Remove" }}</a>
+ </td>
+ </tr>
+ {{ end }}
+ {{ end }}
+ </table>
+{{ end }}
+
+{{ end }}