diff options
Diffstat (limited to 'views/default/tidypics/tagging.php')
-rw-r--r-- | views/default/tidypics/tagging.php | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/views/default/tidypics/tagging.php b/views/default/tidypics/tagging.php index 251534b80..2993fe71b 100644 --- a/views/default/tidypics/tagging.php +++ b/views/default/tidypics/tagging.php @@ -1,32 +1,32 @@ <?php - $image = $vars['image']; - $viewer = $vars['viewer']; - $owner = $vars['owner']; +$image = $vars['image']; +$viewer = $vars['viewer']; +$owner = $vars['owner']; - // get photo tags - $tag_info = $image->getPhotoTags(); +// get photo tags +$tag_info = $image->getPhotoTags(); - // defining json text as "" makes sure the tagging javascript code doesn't throw errors if no tags - $photo_tags_json = "\"\""; - if ($tag_info) { - $photo_tags_json = $tag_info['json']; - } - - if ($tag_info) { +// defining json text as "" makes sure the tagging javascript code doesn't throw errors if no tags +$photo_tags_json = "\"\""; +if ($tag_info) { + $photo_tags_json = $tag_info['json']; +} + +if ($tag_info) { ?> <div id="tidypics_phototags_list"> <h3><?php echo elgg_echo('tidypics:inthisphoto') ?></h3> <ul> <?php - foreach ($tag_info['links'] as $id=>$link) { - echo "<li><a class='tidypics_phototag_links' id='taglink{$id}' href='{$link['url']}'>{$link['text']}</a></li>"; - } + foreach ($tag_info['links'] as $id=>$link) { + echo "<li><a class='tidypics_phototag_links' id='taglink{$id}' href='{$link['url']}'>{$link['text']}</a></li>"; + } ?> </ul> </div> <?php - } +} ?> <div id='tidypics_tag_instructions'> <div id='tidypics_tag_instruct_text'><?php echo elgg_echo('tidypics:taginstruct'); ?></div> @@ -34,10 +34,10 @@ </div> <div id="tidypics_tag_menu" class="tidypics_popup"> <div class='tidypics_popup_header'><h3><?php echo elgg_echo('tidypics:tagthisphoto'); ?></h3></div> -<?php + <?php if ($viewer) { - + $people_list = tp_get_tag_list($viewer); $content = "<div id='tidypics_tagmenu_left'>"; @@ -45,30 +45,30 @@ $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='tidypics_phototag_list'>"; $content .= "<li><a href='javascript:void(0)' onclick='selectUser({$viewer->getGUID()},\"{$viewer->name}\")'> {$viewer->name} (" . elgg_echo('me') . ")</a></li>"; - + if ($people_list) { foreach($people_list as $friend_guid => $friend_name) { $content .= "<li><a href='javascript:void(0)' onclick='selectUser({$friend_guid}, \"{$friend_name}\")'>{$friend_name}</a></li>"; } } - + $content .= "</ul></div>"; - + $content .= "<div id='tidypics_tagmenu_right'><input type='submit' value='" . elgg_echo('tidypics:actiontag') . "' class='submit_button' /></div>"; - + echo elgg_view('input/form', array('internalid' => 'quicksearch', 'internalname' => 'tidypics_phototag_form', 'class' => 'quicksearch', 'action' => "{$vars['url']}action/tidypics/addtag", 'method' => 'post', 'body' => $content)); } -?> -<div class="clearfloat"></div> + ?> + <div class="clearfloat"></div> </div> <div id="tidypics_delete_tag_menu" class="tidypics_popup"> <div class='tidypics_popup_header'><h3><?php echo elgg_echo('tidypics:deltag_title'); ?></h3></div> -<?php + <?php if ($tag_info) { $content = "<input type='hidden' name='image_guid' value='{$image->guid}' />"; foreach ($tag_info['links'] as $id => $link) { @@ -77,7 +77,7 @@ } $content .= "<input type='submit' value='" . elgg_echo('tidypics:actiondelete') . "' class='submit_button' />"; - $content .= "<input type='button' value='" . elgg_echo('cancel') . "' class='cancel_button' onclick='hideDeleteMenu();' />"; + $content .= "<input type='button' value='" . elgg_echo('cancel') . "' class='cancel_button' onclick='hideDeleteMenu();' />"; echo elgg_view('input/form', array('internalname' => 'phototag_deletetag_form', 'action' => "{$vars['url']}action/tidypics/deletetag", 'method' => 'post', 'body' => $content)); @@ -85,5 +85,4 @@ ?> </div> <?php - echo elgg_view('tidypics/js/tagging', array('photo_tags_json' => $photo_tags_json,) ); -?>
\ No newline at end of file +echo elgg_view('tidypics/js/tagging', array('photo_tags_json' => $photo_tags_json,) ); |