mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
b188cbf608
|
@ -0,0 +1,75 @@
|
||||||
|
<script id="modalTable.ejs" type="text/template">
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<%
|
||||||
|
_.each(model, function(row) {
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<th class="collectionTh"><%=row.label%>:</th>
|
||||||
|
<th class="collectionTh">
|
||||||
|
<%
|
||||||
|
switch(row.type) {
|
||||||
|
case "text":
|
||||||
|
%>
|
||||||
|
<input type="text" id="<%=row.id%>" value="<%=row.value||''%>" placeholder="<%=row.placeholder||''%>"></input>
|
||||||
|
<%
|
||||||
|
break;
|
||||||
|
case "password":
|
||||||
|
%>
|
||||||
|
<input type="password" id="<%=row.id%>" value="<%=row.value||''%>" placeholder="<%=row.placeholder||''%>"></input>
|
||||||
|
<%
|
||||||
|
break;
|
||||||
|
case "readonly":
|
||||||
|
%>
|
||||||
|
<div class="modal-text"><%=row.value||''%></div>
|
||||||
|
|
||||||
|
<%
|
||||||
|
break;
|
||||||
|
case "checkbox":
|
||||||
|
var checked = '',
|
||||||
|
disabled = '';
|
||||||
|
if (row.checked) {
|
||||||
|
checked = 'checked';
|
||||||
|
}
|
||||||
|
if (row.checked) {
|
||||||
|
disabled = 'disabled';
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<input type="checkbox" id="<%=row.id%>" value="<%=row.value%>" <%=checked%> <%=disabled%>></input>
|
||||||
|
<%
|
||||||
|
break;
|
||||||
|
case "select":
|
||||||
|
%>
|
||||||
|
<select id="<%=row.id%>" class="modalSelect">
|
||||||
|
<%
|
||||||
|
_.each(row.options, function(opt) {
|
||||||
|
%>
|
||||||
|
<option value="<%=opt.value%>"><%=opt.label%></option>
|
||||||
|
<%
|
||||||
|
});
|
||||||
|
%>
|
||||||
|
</select>
|
||||||
|
<%
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (row.info) {
|
||||||
|
%>
|
||||||
|
<th>
|
||||||
|
<div>
|
||||||
|
<a class="modalTooltips" data-toggle="tooltip" data-placement="left" title="<%=row.info%>">
|
||||||
|
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</th>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<%
|
||||||
|
});
|
||||||
|
%>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</script>
|
Loading…
Reference in New Issue