UNPKG

landmark-serve

Version:

Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose

31 lines (30 loc) 1.62 kB
if !field.isValid .alert.alert-danger Warning: Relationship field <strong>#{field.path}</strong> refers to an invalid list: <strong>#{field.options.ref}</strong> else - var refList = field.refList .field.type-relationship(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', data-field-value=item.get(field.path)) label.field-label= field.label .field-ui .field-message if field.noedit if !field.many && item.get(field.path) a(href='/landmark/' + refList.path + '/' + item.get(field.path), data-ref-path=refList.path).ui-related-item= item.get(field.path) else if field.many && item.get(field.path).length each value in item.get(field.path) a(href='/landmark/' + refList.path + '/' + value, data-ref-path=refList.path).ui-related-item= value else .help-block (not set) else input(type='hidden', name=field.path, id='field_' + field.path, value=field.many ? item.get(field.path).join(',') : item.get(field.path), data-ref-many=field.many ? 'true' : null, data-ref-filters=field.filters, data-ref-path=refList.path, data-ref-singular=refList.singular, data-ref-plural=refList.plural).ui-select2-ref if !field.many a(href='/keystone/' + refList.path + '/' + item.get(field.path), style='margin-left: 10px;' + (!item.get(field.path) ? 'display: none' : '')).btn.btn-link.btn-goto-linked-item view #{refList.singular.toLowerCase()} if field.note .field-note!= field.note