diff options
Diffstat (limited to 'views/pages/user.html')
-rw-r--r-- | views/pages/user.html | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/views/pages/user.html b/views/pages/user.html index 2cf9c54..e654d96 100644 --- a/views/pages/user.html +++ b/views/pages/user.html | |||
@@ -1,4 +1,5 @@ | |||
1 | {{ define "user" }} | 1 | {{ define "user" }} |
2 | {{ $isCurrentUser := (and .user (eq .DisplayUser.ID .user.ID)) }} | ||
2 | <html> | 3 | <html> |
3 | <head> | 4 | <head> |
4 | {{ template "materialize" }} | 5 | {{ template "materialize" }} |
@@ -10,13 +11,33 @@ | |||
10 | <div class="container"> | 11 | <div class="container"> |
11 | <div class="row" style="margin-top: 50px; line-height: 500%; "> | 12 | <div class="row" style="margin-top: 50px; line-height: 500%; "> |
12 | <span style="font-size: 4.2rem; margin: 2.1rem 1rem 1.68rem 0;">{{ .DisplayUser.GetName }}</span> | 13 | <span style="font-size: 4.2rem; margin: 2.1rem 1rem 1.68rem 0;">{{ .DisplayUser.GetName }}</span> |
13 | {{ if .user }} | 14 | {{ if $isCurrentUser }} |
14 | {{ if eq .DisplayUser.ID .user.ID }} | 15 | <a class="btn waves-effect waves-light indigo lighten-5 black-text" style="margin-top: -1.68rem" href="/settings">Einstellungen</a> |
15 | <a class="btn waves-effect waves-light indigo lighten-5 black-text" style="margin-top: -1.68rem" href="/settings">Einstellungen</a> | ||
16 | {{ end }} | ||
17 | {{ end }} | 16 | {{ end }} |
18 | </div> | 17 | </div> |
19 | <blockquote>zuletzt gesehen: {{ .DisplayUser.LastActivity.Format "Mon Jan _2 15:04:05 2006" }}</blockquote><br /> | 18 | <blockquote>zuletzt gesehen: {{ .DisplayUser.LastActivity.Format "Mon Jan _2 15:04:05 2006" }}</blockquote><br /> |
19 | {{ if (and (or $isCurrentUser .DisplayUser.HasExternalServices) .DisplayUser.ExternalServices) }} | ||
20 | <div class="row"> | ||
21 | <h3>Externe Dienste</h3> | ||
22 | <div class="collection" id="external-service-list"> | ||
23 | {{ $model := . }} | ||
24 | {{ range .DisplayUser.ExternalServices }} | ||
25 | {{ if (or .IsEnabled $isCurrentUser) }} | ||
26 | <a href="#" {{ if not .IsEnabled }} data-auth-type="{{ .AuthType }}" data-auth-url="{{ .AuthorizeURL }}" data-couple-url="{{ .CoupleURL }}" {{ end }} class="collection-item {{ if not .IsEnabled }} authorizable {{ end }}"> | ||
27 | <span class="badge {{ if not .IsEnabled }} new no-caption {{ end }}"> | ||
28 | {{ if not .IsEnabled }} | ||
29 | Hinzufügen! | ||
30 | {{ else }} | ||
31 | {{ .UserName }} | ||
32 | {{ end }} | ||
33 | </span> | ||
34 | {{ .Name }} | ||
35 | </a> | ||
36 | {{ end }} | ||
37 | {{ end }} | ||
38 | </div> | ||
39 | </div> | ||
40 | {{ end }} | ||
20 | <div class="row"> | 41 | <div class="row"> |
21 | <h3>Listen von {{ .DisplayUser.GetName }}</h3> | 42 | <h3>Listen von {{ .DisplayUser.GetName }}</h3> |
22 | {{ range .Lists }} | 43 | {{ range .Lists }} |
@@ -24,6 +45,7 @@ | |||
24 | {{ end }} | 45 | {{ end }} |
25 | </div> | 46 | </div> |
26 | </div> | 47 | </div> |
48 | <script src="/assets/js/user.js"></script> | ||
27 | </body> | 49 | </body> |
28 | </html> | 50 | </html> |
29 | {{ end }} | 51 | {{ end }} |