From d1f12039e6ddd29dd18bb9132673e6ff6668e5f0 Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 9 Feb 2009 15:13:03 +0000 Subject: Refs #492: Export and delete links next to entity git-svn-id: https://code.elgg.org/elgg/trunk@2688 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/guidtool/views/default/guidtool/listing.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'mod/guidtool/views') 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 = "url}pg/guidtool/export/{$entity->guid}/\">".elgg_echo('export')." "; + 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 .= "

url}pg/guidtool/view/{$entity->guid}/\">[GUID:{$entity->guid}] " . get_class($entity) . " " . get_subtype_from_id($entity->subtype) . " $strap

"; $info .= "
"; if ($by) $info .= elgg_echo('by') . " getURL()."\">{$by->name} "; - $info .= " " . friendly_time($entity->time_created )."
"; + $info .= " " . friendly_time($entity->time_created )." [$controllinks]"; echo elgg_view_listing($icon, $info); ?> \ No newline at end of file -- cgit v1.2.3