templates.view-entityreport-generic-default.ftl Maven / Gradle / Ivy
<#-- modal header -->
DataSet: ${entityType.getLabel()?html}
<#-- modal body -->
<#-- Generic entity information split into three columns -->
<#assign counter = 0 />
<#list entity.getEntityType().getAtomicAttributes() as atomicAttribute>
<#assign key = atomicAttribute.getName()>
<#if counter == 3>
<#assign counter = 0>
#if>
${key?html}
<#if entity.get(key)??>
<#assign type = atomicAttribute.getDataType()>
<#if type == "CATEGORICAL_MREF" || type == "MREF" || type == "ONE_TO_MANY"><#list entity.getEntities(key) as entity>${entity.getLabelValue()!?html}<#sep>
, #sep>#list>
<#elseif type == "CATEGORICAL" || type == "FILE" || type == "XREF"><#if entity.getEntity(key)??>${entity.getEntity(key).getLabelValue()!?html}#if>
<#elseif type == "BOOL">${entity.getBoolean(key)?c}
<#elseif type == "DATE">${entity.get(key).format("MMM d, yyyy")}
<#elseif type == "DATE_TIME">${entity.get(key).format("MMM d, yyyy hh:mm:ss a")}
<#else>${entity.get(key)!?html}#if>
<#else>
#if>
<#assign counter = counter + 1>
#list>
<#-- fill last row with empty data -->
<#assign counter = 3 - counter>
<#list 1..counter as i>
#list>
<#-- modal footer -->