aboutsummaryrefslogtreecommitdiff
path: root/views/pages/user.html
blob: 54442a91b835370de3bf02c97e852ce5c89df7fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{{ define "user" }}
{{ $isCurrentUser := isSameUser .DisplayUser .user }}
<html>
	<head>
		{{ template "materialize" }}
		<title>{{ .DisplayUser.Name }} - grilist</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
	</head>
	<body>
		{{ template "navbar" . }}
		<div class="container">
			<div class="row" style="margin-top: 50px; line-height: 500%; ">
				<span style="font-size: 4.2rem; margin: 2.1rem 1rem 1.68rem 0;">{{ .DisplayUser.GetName }}</span>
				{{ if $isCurrentUser }}
					&nbsp;&nbsp;<a class="btn waves-effect waves-light indigo lighten-5 black-text" style="margin-top: -1.68rem" href="/settings">Einstellungen</a>
				{{ end }}
			</div>
			<blockquote>zuletzt gesehen: {{ .DisplayUser.LastActivity.Format "Mon Jan _2 15:04:05 2006" }}</blockquote><br />
			{{ if (and (or $isCurrentUser .DisplayUser.HasExternalServices) .DisplayUser.ExternalServices) }}
			<div class="row">
				<h3>Externe Dienste</h3>
				<div class="collection" id="external-service-list">
					{{ $model := . }}
					{{ range .DisplayUser.ExternalServices }}
					{{ if (or .IsEnabled $isCurrentUser) }}
						<a href="{{ if and .IsEnabled .ProfileLink }}{{ .ProfileLink }}{{ else }}#{{ end }}" {{ if not .IsEnabled }} data-auth-type="{{ .AuthType }}" data-auth-url="{{ .AuthorizeURL }}" data-couple-url="{{ .CoupleURL }}" {{ end }} class="collection-item purple-text text-lighten-2 {{ if not .IsEnabled }} authorizable {{ end }}">
							<span class="badge purple lighten-2 {{ if not .IsEnabled }} new no-caption {{ end }}">
								{{ if not .IsEnabled }}
									Hinzufügen!
								{{ else }}
									{{ .UserName }}
								{{ end }}
							</span>
							{{ .Name }}
						</a>
					{{ end }}
					{{ end }}
				</div>
			</div>
			{{ end }}
			<div class="row">
				<h3>Listen von {{ .DisplayUser.GetName }}</h3>
				{{ range .Lists }}
					{{ template "card" . }}
				{{ end }}
			</div>
		</div>
		<script src="/assets/js/user.js"></script>
	</body>
</html>
{{ end }}