-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetadiscussion.html
82 lines (70 loc) · 1.78 KB
/
metadiscussion.html
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<head>
<title>metadiscussion</title>
</head>
<template name="ApplicationLayout">
<div class="container">
{{> yield}}
<footer>
Made with <3 at <a href="https://metalab.at" target="_blank">Metalab</a>. Fork it on <a href="https://github.com/burnoutberni/metadiscussion" target="_blank">Github</a>.
</footer>
</div>
</template>
<template name="home">
{{#if currentUser}}
<div class="top">
current user: {{> loginButtons}}
</div>
{{/if}}
{{#unless currentUser}}
<p>{{> loginButtons}} to add yourself to the speakers list.</p>
{{/unless}}
<div class="buttons">
{{#if currentUser}}
<button class="new-discussion">start a new discussion</button>
{{/if}}
</div>
</template>
<template name="discussion">
{{#if currentUser}}
<div class="top">
current user: {{> loginButtons}}
</div>
{{/if}}
{{#unless currentUser}}
<p>{{> loginButtons}} to add yourself to the speakers list.</p>
{{/unless}}
<div class="buttons">
{{#if currentUserInList}}
<button class="new-speaker">add me to the discussion</button>
{{/if}}
{{#if isAdmin}}
<button class="next">next speaker</button>
{{/if}}
</div>
<ul>
{{#each speakers}}
{{> speaker}}
{{/each}}
{{#if noSpeakers}}
<li class="no-values">
<span>nobody wants to speak.</span>
</li>
{{/if}}
</ul>
</template>
<template name="speaker">
<li class="values">
{{#if isOwner}}
<button class="delete">×</button>
{{else}}
{{#if isAdmin}}
<button class="delete">×</button>
{{/if}}
{{/if}}
<span class="text">{{username}}</span>
{{#if isAdmin}}
<button class="up">▼</button>
<button class="down">▲</button>
{{/if}}
</li>
</template>