-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.html
94 lines (71 loc) · 2.94 KB
/
admin.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
83
84
85
86
87
88
89
90
91
92
93
94
<template name="admin">
<fieldset>
<legend>Add Brewery</legend>
{{>add_brewery}}
</fieldset>
<fieldset>
<legend>Add Beer</legend>
{{> add_beer}}
</fieldset>
</template>
<template name="add_brewery">
<div>
<input value="name" type="text" id="brewery_name" /><br/>
<input value="description" type="text" id="brewery_description" /><br/>
<input value="url" type="text" id="brewery_url" /><br/>
<input value="location" type="text" id="brewery_location" /><br/>
<input value="brewers" type="text" id="brewery_brewers" /><br/>
<input value="guild" type="text" id="brewery_guild" /><br/>
<input class="add btn btn-success" type="button" value="Add" />
</div>
</template>
<template name="add_beer">
<div>
<select id="brewery_select">
{{#each breweries}}
{{>brewery_option}}
{{else}}
<option value="">no breweries yet</option>
{{/each}}
</select>
<input onfocus="$(this).val('');" value="name" type="text" id="beer_name" /><br/>
<input class="add btn btn-success" type="button" value="Add" />
</div>
</template>
<template name="brewery_option">
<option value="{{_id}}">{{name}}</option>
</template>
<template name="edit_brewery">
<div>
<label for="brewery_name">Name</label>
<input value="{{brewery.name}}" type="text" id="brewery_name" /><br/>
<label for="brewery_description">description</label>
<input value="{{brewery.description}}" type="text" id="brewery_description" /><br/>
<label for="brewery_url">Url</label>
<input value="{{brewery.url}}" type="text" id="brewery_url" /><br/>
<label for="brewery_location">Location</label>
<input value="{{brewery.location}}" type="text" id="brewery_location" /><br/>
<label for="brewery_brewers">Brewers</label>
<input value="{{brewery.brewers}}" type="text" id="brewery_brewers" /><br/>
<label for="brewery_guild">Guild</label>
<input value="{{brewery.guild}}" type="text" id="brewery_guild" /><br/>
<input class="save btn btn-success" type="button" value="Save" />
</div>
</template>
<template name="edit_beer">
<div>
<label for="brewery_name">Name</label>
<input value="{{brewery.name}}" type="text" id="brewery_name" /><br/>
<label for="brewery_description">description</label>
<input value="{{brewery.description}}" type="text" id="brewery_description" /><br/>
<label for="brewery_url">Url</label>
<input value="{{brewery.url}}" type="text" id="brewery_url" /><br/>
<label for="brewery_location">Location</label>
<input value="{{brewery.location}}" type="text" id="brewery_location" /><br/>
<label for="brewery_brewers">Brewers</label>
<input value="{{brewery.brewers}}" type="text" id="brewery_brewers" /><br/>
<label for="brewery_guild">Guild</label>
<input value="{{brewery.guild}}" type="text" id="brewery_guild" /><br/>
<input class="save btn btn-success" type="button" value="Save" />
</div>
</template>