aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/list.html39
-rw-r--r--views/list_gril.html38
2 files changed, 40 insertions, 37 deletions
diff --git a/views/list.html b/views/list.html
index fa58f91..b9ef7c8 100644
--- a/views/list.html
+++ b/views/list.html
@@ -18,44 +18,9 @@
18 <blockquote>{{ $list.Description }}</blockquote><br /> 18 <blockquote>{{ $list.Description }}</blockquote><br />
19 <div class="row"> 19 <div class="row">
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 class="gril-list"> 21 <ul id="gril-list" class="gril-list">
22 {{ range $index, $lg := $list.Grils }} 22 {{ range $index, $lg := $list.Grils }}
23 <li id="{{ $index }}"> 23 {{ template "list_gril" makeRangePair $index (makeObject "Gril" $lg "IsListOwner" (and ($user) (eq $user.ID $list.Owner.ID) )) }}
24 <div class="card-panel hoverable list-entry">
25 <div class="row valign-wrapper">
26 <div class="col s3 m2">
27 <div class="circle gril-img" style="background-image: url(/{{ $lg.Gril.ImagePath true }})"> </div>
28 </div>
29 <div class="col s6 m6">
30 <span><a href="/gril/{{ $lg.Gril.Slug }}">{{ $lg.Gril.RomajiName }}</a><br />
31 <span class="jap-name">{{ $lg.Gril.KanjiName }}</span>
32 </span>
33 </div>
34 {{ if ($user) and eq $user.ID $list.Owner.ID }}
35 <div class="col s3 m5">
36 <div class="hide-on-med-and-up">
37 <div class="row list-controls valign-wrapper">
38 <div class="col s6 left-align">
39 <i class="material-icons grey-text" onClick="">keyboard_arrow_up</i>
40 <i class="material-icons grey-text" onClick="">keyboard_arrow_down</i>
41 </div>
42 <div class="col s4 left-align">
43 <i class="hide-on-med-and-up material-icons delete-icon grey-text" onClick="">delete</i>
44 </div>
45 </div>
46 </div>
47 <div class="hide-on-small-only">
48 <div class="valign-wrapper">
49 <i class="medium material-icons grey-text" onClick="">keyboard_arrow_up</i>
50 <i class="medium material-icons grey-text" onClick="">keyboard_arrow_down</i>
51 <i class="material-icons grey-text" onClick="">delete</i>
52 </div>
53 </div>
54 </div>
55 {{ end }}
56 </div>
57 </div>
58 </li>
59 {{ end }} 24 {{ end }}
60 </ul> 25 </ul>
61 </div> 26 </div>
diff --git a/views/list_gril.html b/views/list_gril.html
new file mode 100644
index 0000000..5cfd0df
--- /dev/null
+++ b/views/list_gril.html
@@ -0,0 +1,38 @@
1{{ define "list_gril" }}
2<li id="{{ .Index }}">
3 <div class="card-panel hoverable list-entry">
4 <div class="row valign-wrapper">
5 <div class="col s3 m2">
6 <div class="circle gril-img" style="background-image: url(/{{ .Value.Gril.Gril.ImagePath true }})"> </div>
7 </div>
8 <div class="col s6 m6">
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>
11 </span>
12 </div>
13 {{ if (.Value.IsListOwner) }}
14 <div class="col s3 m5">
15 <div class="hide-on-med-and-up">
16 <div class="row list-controls valign-wrapper">
17 <div class="col s6 left-align">
18 <i class="material-icons grey-text" onClick="">keyboard_arrow_up</i>
19 <i class="material-icons grey-text" onClick="">keyboard_arrow_down</i>
20 </div>
21 <div class="col s4 left-align">
22 <i class="hide-on-med-and-up material-icons delete-icon grey-text" onClick="">delete</i>
23 </div>
24 </div>
25 </div>
26 <div class="hide-on-small-only">
27 <div class="valign-wrapper">
28 <i class="medium material-icons grey-text" onClick="">keyboard_arrow_up</i>
29 <i class="medium material-icons grey-text" onClick="">keyboard_arrow_down</i>
30 <i class="material-icons grey-text" onClick="">delete</i>
31 </div>
32 </div>
33 </div>
34 {{ end }}
35 </div>
36 </div>
37</li>
38{{ end }} \ No newline at end of file