diff options
Diffstat (limited to 'mod/guidtool/views/default')
-rw-r--r-- | mod/guidtool/views/default/guidtool/listing.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mod/guidtool/views/default/guidtool/listing.php b/mod/guidtool/views/default/guidtool/listing.php index fed278568..d543b8e03 100644 --- a/mod/guidtool/views/default/guidtool/listing.php +++ b/mod/guidtool/views/default/guidtool/listing.php @@ -20,13 +20,20 @@ 'size' => 'small', ) ); - + + $ts = time(); + $token = generate_action_token($ts); + + $controllinks = "<a href=\"{$CONFIG->url}pg/guidtool/export/{$entity->guid}/\">".elgg_echo('export')."</a> "; + if ($entity->canEdit()) + $controllinks .= elgg_view('output/confirmlink', array('text' => elgg_echo('delete'), 'href' => "{$CONFIG->url}action/guidtool/delete?guid={$entity->guid}&__elgg_token=$token&__elgg_ts=$ts")); + $strap = $entity->title ? $entity->title : $entity->name; $info .= "<p><b><a href=\"{$CONFIG->url}pg/guidtool/view/{$entity->guid}/\">[GUID:{$entity->guid}] " . get_class($entity) . " " . get_subtype_from_id($entity->subtype) . "</a></b> $strap</p>"; $info .= "<div>"; if ($by) $info .= elgg_echo('by') . " <a href=\"".$by->getURL()."\">{$by->name}</a> "; - $info .= " " . friendly_time($entity->time_created )."</div>"; + $info .= " " . friendly_time($entity->time_created )." [$controllinks]</div>"; echo elgg_view_listing($icon, $info); ?>
\ No newline at end of file |