-
Notifications
You must be signed in to change notification settings - Fork 3
/
mechanics.html
29 lines (27 loc) · 1020 Bytes
/
mechanics.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
<template name="mechanics">
{{! expected data context: list of selected mechanics }}
{{! nested element: label for dropdown }}
<div class="btn-group bb-mechanics-dropdown">
<a class="btn dropdown-toggle btn-inverse pull-left" data-toggle="dropdown" href="#">
{{> Template.contentBlock}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
{{#each mechanics}}
<li><a name="{{canon}}">
<label class="checkbox">
<input data-mechanic="{{canon}}" type="checkbox" checked="{{isChecked}}">{{name}}
</label>
</a></li>
{{/each}}
</ul>
</div>
</template>
<template name="puzzle_mechanics">
{{# mechanics mechanics}}{{nullToZero mechanics.length}} Selected{{/mechanics}}
</template>
<template name="favorite_mechanics">
{{# mechanics currentUser.favorite_mechanics}}
{{nullToZero currentUser.favorite_mechanics.length}} Favorite Mechanic{{#if plural currentUser.favorite_mechanics.length}}s{{/if}}
{{/mechanics}}
</template>