-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcfs-autoform-test-multi.html
168 lines (155 loc) · 5.18 KB
/
cfs-autoform-test-multi.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<template name="navbarMulti">
<nav class="navbar navbar-default">
<div class="navbar-header">
<span class="navbar-brand">Multi</span>
</div>
<div class="container-fluid">
<div class="btn-group" role="group">
<button class="add btn btn-default navbar-btn">
<span class="glyphicon glyphicon-plus" aria-hidden="true">
</span>
Add
</button>
</div>
</div>
</nav>
</template>
<template name="multi_files">
{{#if hasRows}}
<table class="table">
<thead>
<tr>
<th>id</th>
<th>Name</th>
<th>File Ids</th>
<th>Thumbnails</th>
<th> </th>
<th> </th>
<th> </th>
</tr>
</thead>
<tbody>
{{#each doc}}
{{> multi_row}}
{{/each}}
</tbody>
</table>
{{/if}}
</template>
<template name="multi_row">
<tr>
<th scope="row">{{_id}}</th>
<td>{{name}}</td>
<td>{{fileIds}}</td>
<td>
{{#each file}}
<div class="col-xs-6 col-md-3">
{{#if hasThumbnail}}
<img class="thumbnail img-thumbnail img-rounded"
src="{{thumbnail}}"/>
{{else}}
<i class="fa {{icon}} fa-4x"></i>
{{/if}}
</div>
{{/each}}
</td>
<td>
<a id="removeRowM" href="#">
<span class="btn btn-default">
<span class="glyphicon glyphicon-remove"></span>
Remove
</span>
</a>
</td>
<td>
<a class="af" id="af-{{id}}" href="#">
<span class="btn btn-default">
<span class="glyphicon glyphicon-pencil"></span>
AutoForm
</span>
</a>
</td>
<td>
<a class="qf" id="qf-{{id}}" href="#">
<span class="btn btn-default">
<span class="glyphicon glyphicon-pencil"></span>
QuickForm
</span>
</a>
</td>
</tr>
</template>
<template name="updateAutoFormModalMulti">
<div class="modal fade" id="updateAutoFormMulti">
<div class="modal-dialog">
<div class="modal-content">
{{#autoForm id="updateAFMulti" type="update"
collection="MultiDocs"
doc=file}}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">Update File Auto Form</h4>
</div>
<div class="modal-body">
{{> afQuickField name="name"}}
{{> afQuickField name="fileIds" collection="files"}}
</div>
<div class="modal-footer">
<button id="updateFormClose" type="button"
class="btn btn-default" data-dismiss="modal">Close
</button>
<button type="submit" class="btn btn-primary">Save
changes
</button>
</div>
{{/autoForm}}
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
</template>
<template name="updateQuickFormModalMulti">
<div class="modal fade" id="updateQuickFormMulti">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">Update File Quick Form</h4>
</div>
<div class="modal-body">
{{>quickForm id="updateQFMulti" type="update"
collection="MultiDocs" doc=file}}
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
</template>
<template name="addMulti">
<div class="modal fade" id="addMultiModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">Add Mutliple Files</h4>
</div>
<div class="modal-body">
{{> quickForm id="addMulti" type="insert" collection="MultiDocs"}}
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
</template>