Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (32 sloc) 1.703 kb
<% for(var i in properties) { -%>
<% if(properties[i].name !== 'id') { -%>
.control-group
label(for="<%= properties[i].name %>", class="control-label") <%= properties[i].name %>
.controls
<% if(properties[i].type === 'string') { -%>
<% if(properties[i].name === 'password') { -%>
!= contentTag('input', '', {type:'password', class:'span6', name:'<%= properties[i].name %>'})
<% } else { -%>
!= contentTag('input', <%= names.property.singular %>.<%= properties[i].name %>, {type:'text', class:'span6', name:'<%= properties[i].name %>'})
<% } -%>
<% } else if(properties[i].type === 'text') { -%>
!= contentTag('textarea', '', {class: 'span6', name: '<%= properties[i].name %>', rows: 10})
<% } else if(properties[i].type === 'number' || properties[i].type === 'int') { -%>
!= contentTag('input', <%= names.property.singular %>.<%= properties[i].name %>, {type:'number', class:'span2', name:'<%= properties[i].name %>'})
<% } else if(properties[i].type === 'boolean') { -%>
select.span1(name="<%= properties[i].name %>")
if <%= names.property.singular %>.<%= properties[i].name %>
option false
option(selected) true
else
option(selected) false
option true
<% } else if(properties[i].type === 'datetime') { -%>
!= contentTag('input', <%= names.property.singular %>.<%= properties[i].name %>, {type:'datetime', class:'span3', name:'<%= properties[i].name %>'})
<% } else if(properties[i].type === 'date') { -%>
!= contentTag('input', <%= names.property.singular %>.<%= properties[i].name %>, {type:'date', class:'span2', name:'<%= properties[i].name %>'})
<% } else { -%>
| <%= properties[i].type %>
<% } -%>
<% } -%>
<% } -%>
Jump to Line
Something went wrong with that request. Please try again.