{if $tableView || (!$tableView && (strtolower($field->display) != 'text' && empty($forceViewOnly)) || empty($field->control->settings->autocomplete))}
{if strtolower($field->display) == 'text' || !empty($forceViewOnly)} {if !$tableView} {? $label = __($field->caption)} {/if} {? $label = __($field->name)}
{!$label|objectValue:$data|placeValues:$data|nl2br}
{else} {? $ctr = $form} {? $foundComponent = TRUE} {foreach $namePath as $npPart} {if isset($ctr->components[$npPart])} {* Pokud je to autocomplete pole a jsme v teckove notaci az na konci, tak vymenime ID za ID_autocomplete *} {if !empty($field->control->settings->autocomplete) && $iterator->last} {? $ctrId = $ctr->components[$npPart]} {? $ctr = $ctr->components[$npPart.'_autocomplete']} {else} {? $ctr = $ctr->components[$npPart]} {/if} {else} {? $foundComponent = FALSE} {/if} {/foreach} {if $foundComponent} {if !empty($deleteFlag)} {? $deleteFlagNameParts = explode('[', $ctr->getHtmlName()); array_pop($deleteFlagNameParts); $deleteFlagName = trim(implode('[', $deleteFlagNameParts),'[').'[__DELETE_FLAG__]' } {/if} {if $ctr instanceof \Nette\Forms\Controls\Checkbox}
{else} {if !$tableView} {$ctr->label->addAttributes(array('class' => 'control-label'))} {/if} {* PODLE STYLU UPRAVIME VALUE *} {if $ctr instanceof \Nette\Forms\Controls\TextInput && isset($ctr->control->attrs['data-input-type'])} {* TODO: Konverzi hodnot presunout do BasePresenteru *} {* JE TO DATETIME *} {if $ctr->control->attrs['data-input-type'] == 'dtDateTime' && $ctr->control->attrs['value'] != ''} {? $ctr->setValue(date('d.m.Y H:i', strtotime($ctr->control->attrs['value'])))} {/if} {* JE TO DATE *} {if $ctr->control->attrs['data-input-type'] == 'dtDate' && $ctr->control->attrs['value'] != ''} {? $ctr->setValue(date('d.m.Y', strtotime($ctr->control->attrs['value'])))} {/if} {* JE TO FLOAT *} {if $ctr->control->attrs['data-input-type'] == 'dtFloat' && $ctr->control->attrs['value'] != ''} {? $len = preg_split('/[\,\.]/', $ctr->control->attrs['data-input-length'])} {? $ctr->setValue(number_format(str_replace(array(',',' '), array('.',''), $ctr->control->attrs['value']), $len[1], ',', ' '))} {/if} {/if} {if $tableView} {? $ctr->getControlPrototype()->attrs['class'] = 'span12'} {/if} {* u tabulky nesmi byt controls class a misto stylu mu nastavime jen sto procent *}
{if $tableView} {!$ctr->control|replaceRE:'/width:\s*[0-9a-zA-Z%]+;?/':'width:100%;'} {ifset $ctrId}{!$ctrId->control}{? unset($ctrId)}{/ifset} {else} {!$ctr->control} {/if}
{/if} {else}
Component {!=implode('.',$namePath)} not found.
{/if} {/if}
{/if}