aboutsummaryrefslogtreecommitdiff
path: root/views/default/tidypics
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-05-17 19:20:18 +0000
committerCash Costello <cash.costello@gmail.com>2009-05-17 19:20:18 +0000
commitd253222f742b74b8fd232fa39c81c6f39e9d6b9a (patch)
tree5aad00a856ad1ed15e6ced12eb5b3028fcf9a998 /views/default/tidypics
parent82aa80bd54908ec2934f45d1f270de568adc1c97 (diff)
downloadelgg-d253222f742b74b8fd232fa39c81c6f39e9d6b9a.tar.gz
elgg-d253222f742b74b8fd232fa39c81c6f39e9d6b9a.tar.bz2
moved tagging from image.php to a view - make sure to refresh view cache when updating to this version
Diffstat (limited to 'views/default/tidypics')
-rw-r--r--views/default/tidypics/tagging.php57
1 files changed, 57 insertions, 0 deletions
diff --git a/views/default/tidypics/tagging.php b/views/default/tidypics/tagging.php
new file mode 100644
index 000000000..a97285016
--- /dev/null
+++ b/views/default/tidypics/tagging.php
@@ -0,0 +1,57 @@
+<?php
+ $photo_tags = $vars['photo_tags'];
+ $links = $vars['links'];
+ $photo_tags_json = $vars['photo_tags_json'];
+ $file_guid = $vars['file_guid'];
+
+ if ($photo_tags) {
+?>
+<div id="tidypics_phototags_list">
+ <h3><?php echo elgg_echo('tidypics:inthisphoto') ?></h3>
+ <ul>
+<?php
+ foreach ($links as $tag_link) {
+ echo "<li><a class='phototag-links' id='taglink{$tag_link[0]}' href='#'>{$tag_link[1]}</a></li>";
+ }
+?>
+ </ul>
+</div>
+<?php
+ }
+?>
+<div id='tagging_instructions'>
+ <div id='tag_instruct_text'><?php echo elgg_echo('tidypics:taginstruct'); ?></div>
+ <div id='tag_instruct_button_div'><button class='submit_button' id='tag_instruct_button' onclick='stopTagging()'><?php echo elgg_echo('tidypics:finish_tagging'); ?></button></div>
+</div>
+<div id="tag_menu">
+<?php
+
+ $viewer = get_loggedin_user();
+ if($viewer) {
+ $friends = get_entities_from_relationship('friend', $viewer->getGUID(), false, 'user', '', 0);
+
+ $content = "<input type='hidden' name='image_guid' value='{$file_guid}' />";
+ $content .= "<input type='hidden' name='coordinates' id='coordinates' value='' />";
+ $content .= "<input type='hidden' name='user_id' id='user_id' value='' />";
+ $content .= "<input type='hidden' name='word' id='word' value='' />";
+
+ $content .= "<ul id='phototagging-menu'>";
+ $content .= "<li><a href='javascript:void(0)' onClick='selectUser({$viewer->getGUID()},\"{$viewer->name}\")'> {$viewer->name} (" . elgg_echo('me') . ")</a></li>";
+
+ if ($friends) {
+ foreach($friends as $friend) {
+ $content .= "<li><a href='javascript:void(0)' onClick='selectUser({$friend->getGUID()}, \"{$friend->name}\")'>{$friend->name}</a></li>";
+ }
+ }
+ }
+ $content .= "</ul>";
+
+ $content .= "<fieldset><button class='submit_button' type='submit'>" . elgg_echo('tidypics:actiontag') . "</button></fieldset>";
+
+ echo elgg_view('input/form', array('internalid' => 'quicksearch', 'internalname' => 'form-phototagging', 'class' => 'quicksearch', 'action' => "{$vars['url']}action/tidypics/addtag", 'body' => $content));
+
+?>
+</div>
+<?php
+ echo elgg_view('js/tagging', array('photo_tags_json' => $photo_tags_json,) );
+?> \ No newline at end of file