diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-09 15:13:03 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-09 15:13:03 +0000 |
commit | d1f12039e6ddd29dd18bb9132673e6ff6668e5f0 (patch) | |
tree | a7bb5f81b96cc14cff709645af5860881d55fea5 /mod/guidtool/views | |
parent | e71557a73340f21fc43f5a80f7baabecca43289a (diff) | |
download | elgg-d1f12039e6ddd29dd18bb9132673e6ff6668e5f0.tar.gz elgg-d1f12039e6ddd29dd18bb9132673e6ff6668e5f0.tar.bz2 |
Refs #492: Export and delete links next to entity
git-svn-id: https://code.elgg.org/elgg/trunk@2688 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/guidtool/views')
-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 |