aboutsummaryrefslogtreecommitdiff
path: root/views/list.html
blob: b9ef7c89e3d6075a9ea453deaffe7b5f31b5b774 (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
{{ define "list" }}
{{ $list := .list }}
{{ $user := .user }}
<html>
	<head>
		{{ template "materialize" }}
		<title>grilist</title>
		<link rel="stylesheet" href="/assets/css/list.css" />
		<link rel="stylesheet" href="/assets/css/search.css" />
		<script src="/assets/js/search.js"></script>
		<script src="/assets/js/list.js"></script>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
	</head>
	<body>
		{{ template "navbar" . }}
		<div class="container">
			<h1>{{ $list.Name }}<small>von {{ $list.Owner.GetName }}</small></h1>
			<blockquote>{{ $list.Description }}</blockquote><br />
			<div class="row">
				<div class="col s12 {{ if ($user) and eq $user.ID $list.Owner.ID }}l8{{ end }}">
					<ul id="gril-list" class="gril-list">
					{{ range $index, $lg := $list.Grils }}
						{{ template "list_gril" makeRangePair $index (makeObject "Gril" $lg "IsListOwner" (and ($user) (eq $user.ID $list.Owner.ID) )) }}
					{{ end }}
					</ul>
				</div>
				{{ if ($user) and eq $user.ID $list.Owner.ID }}
				<div class="col s12 l4">
					<div class="card-panel" style="margin-top: 14px">
						<span style="font-size: 130%">Gril hinzufügen</span><br />
						<form>
							<div class="input-field">
								<input id="search" type="search" onKeyDown="instantSearch()" required>
								<label for="search"><i class="material-icons">search</i></label>
								<i class="material-icons">close</i>
							</div>
						</form>
					</div>
					<div class="col s10 offset-s1">
						<ul class="collection search-results" id="search-results">
						</ul>
					</div>
				</div>
				{{ end }}
			</div>
		</div>
	</body>
</html>
{{ end }}