diff options
author | jan <jan@ruken.pw> | 2016-01-16 21:28:59 (UTC) |
---|---|---|
committer | jan <jan@ruken.pw> | 2016-01-16 21:28:59 (UTC) |
commit | 5812371696b716417f75eb0ba98ff14a03a5d0ad (patch) | |
tree | 50645b266d71bf45f885c44a695115462b25c969 /views | |
parent | df4c2d2cd5bf222e664167abc8c91e286e5b2c3a (diff) |
simple user view (bsp. /user/1 bzw /user/1/Admin)
Diffstat (limited to 'views')
-rw-r--r-- | views/navbar.html | 2 | ||||
-rw-r--r-- | views/user.html | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/views/navbar.html b/views/navbar.html index c456112..a0db664 100644 --- a/views/navbar.html +++ b/views/navbar.html | |||
@@ -5,7 +5,7 @@ | |||
5 | <ul id="nav-mobile" class="right hide-on-med-and-down"> | 5 | <ul id="nav-mobile" class="right hide-on-med-and-down"> |
6 | {{ if .user }} | 6 | {{ if .user }} |
7 | <li><a href="/new/list">Liste erstellen</a></li> | 7 | <li><a href="/new/list">Liste erstellen</a></li> |
8 | <li><a href="/">{{ .user.GetName }}</a></li> | 8 | <li><a href="/user/{{ .user.ID }}/{{ .user.GetName }}">{{ .user.GetName }}</a></li> |
9 | <li><a href="/logout">Ausloggen</a></li> | 9 | <li><a href="/logout">Ausloggen</a></li> |
10 | {{ else }} | 10 | {{ else }} |
11 | <li><a href="/login">Einloggen</a></li> | 11 | <li><a href="/login">Einloggen</a></li> |
diff --git a/views/user.html b/views/user.html new file mode 100644 index 0000000..19ffff6 --- /dev/null +++ b/views/user.html | |||
@@ -0,0 +1,22 @@ | |||
1 | {{ define "user" }} | ||
2 | <html> | ||
3 | <head> | ||
4 | {{ template "materialize" }} | ||
5 | <title>{{ .DisplayUser.Name }} - grilist</title> | ||
6 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | ||
7 | </head> | ||
8 | <body> | ||
9 | {{ template "navbar" . }} | ||
10 | <div class="container"> | ||
11 | <h1>{{ .DisplayUser.Name }}</h1> | ||
12 | <blockquote>zuletzt gesehen: {{ .DisplayUser.LastActivity.Format "Mon Jan _2 15:04:05 2006" }}</blockquote><br /> | ||
13 | <div class="row"> | ||
14 | <h3>Listen von {{ .DisplayUser.Name }}</h3> | ||
15 | {{ range .Lists }} | ||
16 | {{ template "card" . }} | ||
17 | {{ end }} | ||
18 | </div> | ||
19 | </div> | ||
20 | </body> | ||
21 | </html> | ||
22 | {{ end }} | ||