diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2012-02-17 17:26:45 -0800 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2012-02-17 17:26:45 -0800 |
commit | ee6da62511660cf5849fea1a39a3e94c1f2867c7 (patch) | |
tree | 95f9803c1ae0888f0633b1a9dae7d94aa8cb695c /views/default/photos | |
parent | b09db0ec2a35590cb13cda6ed053edc10e671035 (diff) | |
download | elgg-ee6da62511660cf5849fea1a39a3e94c1f2867c7.tar.gz elgg-ee6da62511660cf5849fea1a39a3e94c1f2867c7.tar.bz2 |
Fixes #15. Added untagging.
Diffstat (limited to 'views/default/photos')
-rw-r--r-- | views/default/photos/tagging/tag.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/views/default/photos/tagging/tag.php b/views/default/photos/tagging/tag.php index 93ea16218..6f6af968a 100644 --- a/views/default/photos/tagging/tag.php +++ b/views/default/photos/tagging/tag.php @@ -28,9 +28,23 @@ if ($vars['tag']->type == 'user') { $label = $vars['tag']->value; } +$delete = ''; +$annotation = get_annotation($vars['tag']->annotation_id); + +if ($annotation->canEdit()) { + $url = elgg_http_add_url_query_elements('action/photos/image/untag', array( + 'annotation_id' => $vars['tag']->annotation_id + )); + $delete = elgg_view('output/confirmlink', array( + 'href' => $url, + 'text' => elgg_view_icon('delete', 'float mas'), + 'confirm' => elgg_echo('tidypics:phototagging:delete:confirm') + )); +} + echo <<<HTML <div class="tidypics-tag-wrapper"> - <div $attributes></div> + <div $attributes>$delete</div> <div class="elgg-module-popup tidypics-tag-label">$label</div> </div> HTML; |