extends layouts/default

block content

  - var idField = resource.fields.id;
  - var nameField = resource.fields.name;

  h1
    .ui.breadcrumb
      block breadcrumbs
        a.active.section(href="/#{resource.collection}") #{resource.plural}
        - if (typeof(item) != 'undefined')
          .divider /
          a.section(href="/#{resource.collection}/#{item[ resource.fields.id ]}") #{item[ resource.fields.name ]}

    - if (typeof(item) != 'undefined')
      .ui.right.floated.header
        a.ui.button(href="/#{resource.collection}/#{item[ resource.fields.id ]}") edit

  - var fields = Object.keys(resource.keys) || []
  - fields = fields.filter(function(x) {
  -   return (resource.attributes[ x ]._type !== 'password'); 
  - })
  - if (resource.fields.name !== '_id') {
  -   delete resource.keys['_id']
  - }

  //- TODO: use different modules for different collection types?
  if (!collection)
    //- No collection was provided, render single
    include modules/item

  else
    include modules/collection

    h3 Create
    include forms/resource-create

extends layouts/default

block content

  - var idField = resource.fields.id;
  - var nameField = resource.fields.name;

  h1
    .ui.breadcrumb
      block breadcrumbs
        a.active.section(href="/#{resource.collection}") #{resource.plural}
        - if (typeof(item) != 'undefined')
          .divider /
          a.section(href="/#{resource.collection}/#{item[ resource.fields.id ]}") #{item[ resource.fields.name ]}

    - if (typeof(item) != 'undefined')
      .ui.right.floated.header
        a.ui.button(href="/#{resource.collection}/#{item[ resource.fields.id ]}") edit

  - var fields = Object.keys(resource.keys) || []
  - fields = fields.filter(function(x) {
  -   if (!resource.attributes[ x ]) return true;
  -   return (resource.attributes[ x ]._type !== 'password'); 
  - })
  - if (resource.fields.name !== '_id') {
  -   delete resource.keys['_id']
  - }

  //- TODO: use different modules for different collection types?
  if (!collection)
    //- No collection was provided, render single
    include modules/item

  else
    include modules/collection

    h3 Create
    include forms/resource-create

Handle an issue with non-_typed fields.
Handle an issue with non-_typed fields.
