2017-12-14 16:23:45 +01:00
|
|
|
mixin propTable(props)
|
|
|
|
table.props
|
|
|
|
thead: tr
|
2018-07-06 05:17:38 +02:00
|
|
|
th= i18n('docs.api.props.name')
|
|
|
|
th= i18n('docs.api.props.type')
|
|
|
|
th= i18n('docs.api.props.optional')
|
|
|
|
th= i18n('docs.api.props.description')
|
2017-12-14 16:23:45 +01:00
|
|
|
tbody
|
|
|
|
each prop in props
|
|
|
|
tr
|
|
|
|
td.name= prop.name
|
|
|
|
td.type
|
|
|
|
i= prop.type
|
|
|
|
if prop.kind == 'id'
|
|
|
|
if prop.entity
|
|
|
|
| (
|
2018-05-06 20:05:00 +02:00
|
|
|
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
2017-12-14 16:23:45 +01:00
|
|
|
| ID)
|
|
|
|
else
|
|
|
|
| (ID)
|
|
|
|
else if prop.kind == 'entity'
|
|
|
|
| (
|
2018-05-06 20:05:00 +02:00
|
|
|
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
2017-12-14 16:23:45 +01:00
|
|
|
| )
|
|
|
|
else if prop.kind == 'object'
|
|
|
|
if prop.def
|
|
|
|
| (
|
|
|
|
a(href=`#${prop.defName}`)= prop.defName
|
|
|
|
| )
|
|
|
|
else if prop.kind == 'date'
|
|
|
|
| (Date)
|
2017-12-16 20:02:30 +01:00
|
|
|
td.optional
|
|
|
|
if prop.optional
|
2018-07-06 05:17:38 +02:00
|
|
|
= i18n('docs.api.props.yes')
|
2017-12-16 20:02:30 +01:00
|
|
|
else
|
2018-07-06 05:17:38 +02:00
|
|
|
= i18n('docs.api.props.no')
|
|
|
|
td.desc!= prop.desc ? prop.desc[lang] || prop.desc['ja'] : null
|