blob: 71f25fd95715db779af7c0ffbca0e882f11382c2 (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
{{ define "list" }}
{{ $list := .list }}
{{ $user := .user }}
<html>
<head>
{{ template "materialize" }}
{{ template "js" "like" }}
<title>grilist</title>
<link rel="stylesheet" href="/assets/css/list.css" />
<link rel="stylesheet" href="/assets/css/search.css" />
<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">
{{ if .isOwner }}<div class="row valign-wrapper">
<div class="col s10">{{ end }}
<h1>{{ $list.Name }} <small>von <a href="/user/{{ $list.Owner.ID }}/{{ $list.Owner.GetName}}">{{ $list.Owner.GetName }}</a></small></h1>
{{ if .isOwner }}</div>
<div class="col s2 right-align">
<a class="waves-effect waves-light purple lighten-4 btn" style="margin-top: 8px; width: auto"href="/list/{{ $list.ID }}/settings">
<i class="material-icons">settings</i>
</a>
</div>
</div>{{ end }}
<blockquote>{{ $list.Description }}</blockquote><br />
{{ if isSameUser $user $list.Owner }}
{{ template "like" (map "ContentType" 0 "ContentID" $list.ID) }}
{{ else }}
{{ template "like" (map "ContentType" 0 "ContentID" $list.ID "User" $user) }}
{{ end }}
<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 }}
{{ if $user }}
{{ template "list_gril" makeRangePair $index (makeObject "Gril" $lg "IsListOwner" (eq $user.ID $list.Owner.ID)) }}
{{ else }}
{{ template "list_gril" makeRangePair $index (makeObject "Gril" $lg "IsListOwner" false) }}
{{ end }}
{{ end }}
</ul>
</div>
{{ if .isOwner }}
<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="gril-add-search" class="gril-search" type="search" required>
<label for="gril-add-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 }}
|