diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/list.html | 6 | ||||
-rw-r--r-- | views/list_gril.html | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/views/list.html b/views/list.html index b9ef7c8..81e8825 100644 --- a/views/list.html +++ b/views/list.html | |||
@@ -20,7 +20,11 @@ | |||
20 | <div class="col s12 {{ if ($user) and eq $user.ID $list.Owner.ID }}l8{{ end }}"> | 20 | <div class="col s12 {{ if ($user) and eq $user.ID $list.Owner.ID }}l8{{ end }}"> |
21 | <ul id="gril-list" class="gril-list"> | 21 | <ul id="gril-list" class="gril-list"> |
22 | {{ range $index, $lg := $list.Grils }} | 22 | {{ range $index, $lg := $list.Grils }} |
23 | {{ template "list_gril" makeRangePair $index (makeObject "Gril" $lg "IsListOwner" (and ($user) (eq $user.ID $list.Owner.ID) )) }} | 23 | {{ if $user }} |
24 | {{ template "list_gril" makeRangePair $index (makeObject "Gril" $lg "IsListOwner" (eq $user.ID $list.Owner.ID)) }} | ||
25 | {{ else }} | ||
26 | {{ template "list_gril" makeRangePair $index (makeObject "Gril" $lg "IsListOwner" false) }} | ||
27 | {{ end }} | ||
24 | {{ end }} | 28 | {{ end }} |
25 | </ul> | 29 | </ul> |
26 | </div> | 30 | </div> |
diff --git a/views/list_gril.html b/views/list_gril.html index 5cfd0df..37cf44c 100644 --- a/views/list_gril.html +++ b/views/list_gril.html | |||
@@ -5,12 +5,12 @@ | |||
5 | <div class="col s3 m2"> | 5 | <div class="col s3 m2"> |
6 | <div class="circle gril-img" style="background-image: url(/{{ .Value.Gril.Gril.ImagePath true }})"> </div> | 6 | <div class="circle gril-img" style="background-image: url(/{{ .Value.Gril.Gril.ImagePath true }})"> </div> |
7 | </div> | 7 | </div> |
8 | <div class="col s6 m6"> | 8 | <div class="col {{ if .Value.IsListOwner }}s6 m3{{ else }}s9 m10{{ end }}"> |
9 | <span><a href="/gril/{{ .Value.Gril.Gril.Slug }}">{{ .Value.Gril.Gril.RomajiName }}</a><br /> | 9 | <span><a href="/gril/{{ .Value.Gril.Gril.Slug }}">{{ .Value.Gril.Gril.RomajiName }}</a><br /> |
10 | <span class="jap-name">{{ .Value.Gril.Gril.KanjiName }}</span> | 10 | <span class="jap-name">{{ .Value.Gril.Gril.KanjiName }}</span> |
11 | </span> | 11 | </span> |
12 | </div> | 12 | </div> |
13 | {{ if (.Value.IsListOwner) }} | 13 | {{ if .Value.IsListOwner }} |
14 | <div class="col s3 m5"> | 14 | <div class="col s3 m5"> |
15 | <div class="hide-on-med-and-up"> | 15 | <div class="hide-on-med-and-up"> |
16 | <div class="row list-controls valign-wrapper"> | 16 | <div class="row list-controls valign-wrapper"> |