[-
$r = shift ;
$set = $r -> {item_set} ;

$tt = $r->{category_set}{table_type};
$cy = $r->{category_types}; 
$cf = $r->{category_fields};
$title_type = $r->{category_title_type};
-]

<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td class="cPodH1">[+ $r -> {category_set}{category} +]<br>
                   ([= items_of =] [+ $r -> {user_email} +][+ $r->{user_admin}?"[admin]":'' +])</td>
<td class="cPodH1Link"><a href="add.epl?category_id=[+ $fdat{category_id} +]">[= add_item =]</a></td>
</tr>
<tr><td colspan="2" height="5"></td></tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="6">
  <colgroup>
    <col width="5%">
    <col width="90%">
    <col width="5%">
  </colgroup>
[$ while ($rec = $$set -> Next) $]

[$ if ($r -> {user_id} and (($r -> {user_id} == $rec->{user_id}) or ($r -> {user_admin}))) $]
[- 
$date = $rec -> {modtime} ; 
$date =~ /^(\d+)-(\d+)-(\d+)/ ;
$date = $r -> param -> language eq 'de'?"$3.$2.$1":"$2/$3/$1" ;
-]

<tr>
  <td colspan="2"  class="cPodH2">
    [$ if $cy->{$title_type} =~ /pulldown/ $]
     [+ $r->app->get_title($r,$title_type,$rec->{$title_type}) +]
    [$ else $]
      [+ $rec -> {$title_type} +]
    [$ endif $]
  </td>
  <td align="right" nowrap class="cPodH2Link">
    [ 
      [+ $date +] 
      [$ if ($r->{user_id} && $r->{user_id} == $rec->{user_id}) || $r->{user_admin} $]
        |
        [+ $r -> gettext($r->{item_set}{state} ? 'display' : 'hide') +] 
        |
        <A HREF="add.epl?[+ $tt +]_id=[+ $rec->{$tt.'_id'} +]&-edit_item=1&category_id=[+ $rec->{category_id} +]">Edit</A>
      [$ endif $]
      |
      <a href="#top">Top</a>
    ]
  </td>
</tr>


[$ foreach $type (grep { $_ ne $title_type } @$cf) $]
<tr>
<td><b>[+ $r->{category_texts}{$type.'_text'} +]</b></td>
<td colspan="2"><p>
[$ if $r->{category_types}{$type} =~ /url/ $]
<A HREF="[+ do { local $escmode = 0; $rec -> {$type} } +]">[+ $rec -> {$type} +]</A>
[$ else $]
[+ $rec -> {$type} +]
[$ endif $]
</p></td>
</tr>
[$ endforeach $]
[$ endif $]
[$ endwhile $]
</table>

