<{*
assign( 'vars', 
    array(
        'table_name'=>'xnppaper_author',
        'objects'=>array(
            'primary_key'=>array(
                'name'=>'paper_author_id',
                'value'=>'100'),
            'text'=>array(
                'name'=>'author',
                'within'=>'author',//(optional)a portion of value in max length
                'without'=>'author',//(optional)a portion of value after the within
                'value'=>'foo'),
            'order'=>array(
                'name'=>'author_order',
                'value'=>'0')),
        array(...),
        ...));
*}>
    <table>
<{foreach item=var key=key from=$vars.objects}>
     <tr>
      <td class='<{cycle name='oddeven_author' values='odd,even'}>'>
 <{if !empty($var.text.without)}>
        <{$var.text.within}><span  style="color:red;"><{$var.text.without}></span>
 <{else}>
        <{$var.text.value}>
 <{/if}>
        <input type='hidden' name='<{$vars.table_name}>[<{$key}>][<{$var.primary_key.name}>]' value='<{$var.primary_key.value}>'/>
        <input type='hidden' name='<{$vars.table_name}>[<{$key}>][<{$var.text.name}>]' value='<{$var.text.value}>'/>
        <input type='hidden' name='<{$vars.table_name}>[<{$key}>][<{$var.order.name}>]' value='<{$var.order.value}>'/>
      </td>
     </tr>
<{/foreach}>
    </table>




<{*
$vars = array();
foreach($detail->getAuthors() as $author){
    $vars[]=array(
        'hidden_name'=>array_keys($author->getVarArray('s')),
        'hidden_value'=>array_values($author->getVarArray('s')),
        'value'=>$author->getVar('author', 's'),
        'table_name'=>$author_handler->getTableName());
}
$tamplate->assign('vars', $vars);
*}>
<{*
    <table>
<{foreach item=var key=key from=$vars}>
     <tr>
      <td class='<{cycle name='oddeven_author' values='odd,even'}>'>
        <{$var.value}>
<{foreach item=hidden key=i from=$var.hidden_name}>
  <{if !empty($var.hidden_name[$i])}>
        <input type='hidden' name='<{$var.table_name}>[<{$key}>][<{$var.hidden_name[$i]}>]' value='<{$var.hidden_value[$i]}>'/>
  <{/if}>
<{/foreach}>
      </td>
     </tr>
<{/foreach}>
    </table>
*}>



