| 1 |
[- |
| 2 |
$r = shift ; |
| 3 |
$set = $r -> {item_set} ; |
| 4 |
|
| 5 |
$escmode = 0 ; |
| 6 |
-] |
| 7 |
|
| 8 |
=pod |
| 9 |
|
| 10 |
=head1 NAME |
| 11 |
|
| 12 |
[+ $r -> {category_set}{category} +] |
| 13 |
|
| 14 |
[$ while ($rec = $$set -> Next) $] |
| 15 |
|
| 16 |
[- |
| 17 |
$date = $rec -> {modtime} ; |
| 18 |
$date =~ /^(\d+)-(\d+)-(\d+)/ ; |
| 19 |
$date = $r -> param -> language eq 'de'?"$3.$2.$1":"$2/$3/$1" ; |
| 20 |
-] |
| 21 |
|
| 22 |
=head1 [+ $rec -> {heading} +] |
| 23 |
|
| 24 |
[# Without the if-then-else this goes wrong if description is empty #] |
| 25 |
[$ if $rec -> {description} $] |
| 26 |
[+ $rec -> {description} +] [[[+ $date +]] |
| 27 |
[$ else $] |
| 28 |
[[[+ $date +]] |
| 29 |
[$ endif $] |
| 30 |
|
| 31 |
[+ $rec -> {url} +] |
| 32 |
|
| 33 |
[$ if ($r->{user_id} && $r->{user_id} == $rec->{user_id}) || $r->{user_admin} $]L<Edit|../add.epl?item_id=[+ $rec->{item_id} +]&-edit_item=1&category_id=[+ $rec->{category_id} +]> | Status: [+ $r -> gettext ($r->{item_set}{state} ? 'display' : 'hide') +][$ endif $] |
| 34 |
|
| 35 |
[$ endwhile $] |