{if $template_event eq 'preview'}
<div class="sub-content">              
  <div class="sub-header">                
    <img src="{get_image_link id=$user_id}" class="avatar" alt="" />                
    PREVIEW              
  </div>              
  <div class="sub-body">
    {$post_vars.node_content|preview}
  </div>            
</div>
{* end of preview *}

{elseif $template_event eq 'filter_by'}
	{get_flat_children listing_amount=23232322323 offset=$offset types=$children_types search_type=$post_vars.search_type search=$post_vars.node_content}
{elseif $node.node_user_subchild_count eq true}
	{get_flat_children listing_amount=$node.node_user_subchild_count+5 orderby_type='time' offset=$offset}
{else}
	{get_flat_children listing_amount=$listing_amount orderby_type='time' offset=$offset}
{/if}

{*get_linked_nodes*}

{*merge_arrays array1=$get_flat_children array2=$get_linked_nodes sort_by='node_created'*}


{foreach from=$get_flat_children item=child}
<table class="bordered" cellspacing="0" cellpadding="0"><tr><td align="center" valign="top" rowspan="2">
	<img vspace="5" hspace="5" width="50" src="{get_image_link id=$child.node_creator}" alt="{get_image_link id=$child.node_creator}" />
	{if $child.k eq true}<span class="most_important">{$child.k} k</span>{/if}
</td>

<td valign="top" style="width:100%;">
	<table width="100%"><tr class="header" valign="top"><td>
		 <a href="/id/{$child.node_creator}">{$child.creator}</a>
		{if $child.user_action neq false}
			 [lokacia :: <a href="{$child.user_action}">{$child.user_action}</a>]
		{/if}
		  {$child.node_created|date_format:"%H:%M:%S - %d.%m.%Y"} 
		  
		  <a href="/id/{$child.node_id}">{$child.node_name}</a>  
		{if $child.k > 0} [<span class="most_important">{$child.k}K</span>] {/if}
		{if $child.node_created > $node.last_visit}<span class="most_important">  NEW</span>{/if}
		{if $child.node_children_count}<span class="most_important">{$child.node_children_count}  CHILDREN</span>{/if}
		{if $child.node_parent neq $node.node_id}<span class="most_important">LINKED</span>{/if}
		</td></tr><tr><td>{$child.node_content|stripslashes}</td></tr></table></td></tr></table><br />
{/foreach}
