Commit b3ba1c90 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Fixed template thingy (from penny)

parent 3a467a7a
......@@ -376,33 +376,48 @@ function template_render($template, $mode, $data=array()) {
}
if ($artefact === null) {
$block .= template_render_empty_artefact_block();
if ($mode == TEMPLATE_RENDER_EDITMODE) {
$block .= template_render_empty_artefact_block();
}
else {
$block .= '';
}
}
else {
$block .= template_render_artefact_block($t['id'], $artefact, $t['defaultformat']);
}
}
else {
$block .= template_render_empty_artefact_block();
if ($mode == TEMPLATE_RENDER_EDITMODE) {
$block .= template_render_empty_artefact_block();
}
else {
$block .= '';
}
}
break;
}
// span or div?
if (isset($t['tagtype']) && $t['tagtype'] == 'span') {
$html .= '<span';
$html .= template_render_attributes($attr);
$html .= '>';
$html .= $block;
$html .= '</span>';
}
else {
$html .= '<div';
$html .= template_render_attributes($attr);
$html .= '>';
$html .= $block;
$html .= '</div>';
if (empty($block) && $mode == TEMPLATE_RENDER_READONLY) {
$html .= '';
}
else{
// span or div?
if (isset($t['tagtype']) && $t['tagtype'] == 'span') {
$html .= '<span';
$html .= template_render_attributes($attr);
$html .= '>';
$html .= $block;
$html .= '</span>';
}
else {
$html .= '<div';
$html .= template_render_attributes($attr);
$html .= '>';
$html .= $block;
$html .= '</div>';
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment