landmark-serve
Version:
Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose
49 lines (46 loc) • 2.95 kB
text/jade
.field.type-location(data-field-type=field.type, data-field-path=field.path, data-field-collapse=field.collapse ? 'true' : false, data-field-depends-on=field.dependsOn, data-field-noedit=field.noedit ? 'true' : 'false')
if field.noedit
label.field-label= field.label
.field-ui.noedit: .field-value= field.format(item)
else
.field-ui
label= field.label
a(href=js).field-label-companion.btn-show-extras (show more fields)
.row.extras
.col-sm-3.col-md-2: label.text-muted PO Box / Shop
.col-sm-3.col-md-2: input(type='text', name=field.paths.number, value=item.get(field.paths.number)).form-control
.row.extras
.col-sm-3.col-md-2: label.text-muted Building Name
.col-sm-9.col-md-5: input(type='text', name=field.paths.name, value=item.get(field.paths.name)).form-control
.row
.col-sm-3.col-md-2: label.text-muted Street Address
.col-sm-9.col-md-5: input(type='text', name=field.paths.street1, value=item.get(field.paths.street1)).form-control
.row.extras
.col-sm-3.col-md-2: label.text-muted Street Address 2
.col-sm-9.col-md-5: input(type='text', name=field.paths.street2, value=item.get(field.paths.street2)).form-control
.row
.col-sm-3.col-md-2: label.text-muted Suburb
.col-sm-9.col-md-5: input(type='text', name=field.paths.suburb, value=item.get(field.paths.suburb)).form-control
.row
.col-sm-3.col-md-2: label.text-muted State
.col-sm-3.col-md-2: input(type='text', name=field.paths.state, value=item.get(field.paths.state)).form-control
.col-sm-2.col-md-1.field-postcode: label.text-muted Postcode
.col-sm-3.col-md-2: input(type='text', name=field.paths.postcode, value=item.get(field.paths.postcode)).form-control
.row
.col-sm-3.col-md-2: label.text-muted Country
.col-sm-9.col-md-5: input(type='text', name=field.paths.country, value=item.get(field.paths.country)).form-control
.row.extras
.col-sm-3.col-md-2: label.text-muted Lng/Lat
.col-sm-9.col-md-5: .form-row
.col-sm-6: input(type='text', name=field.paths.geo, value=item.get(field.path + '.geo') ? item.get(field.path + '.geo')[0] : '', placeholder='Longitude').form-control
.col-sm-6: input(type='text', name=field.paths.geo, value=item.get(field.path + '.geo') ? item.get(field.path + '.geo')[1] : '', placeholder='Latitude').form-control
if field.enableMapsAPI
.row: .col-sm-9.col-md-10.col-sm-offset-3.col-md-offset-2.improve-options
label(for=field.paths.improve, title='When checked, this will attempt to fill missing fields. It will also get the lat/long').checkbox.autoimprove
input(type='checkbox', name=field.paths.improve, id=field.paths.improve, value='true')
| Autodetect and improve location on save
label(for=field.paths.overwrite).checkbox.overwrite
input(type='checkbox', name=field.paths.overwrite, id=field.paths.overwrite, value='true')
| Replace existing data
if field.note
.field-note!= field.note