| @@ 140-153 (lines=14) @@ | ||
| 137 | return $return; |
|
| 138 | } |
|
| 139 | ||
| 140 | if ($annotation->canEdit()) { |
|
| 141 | $url = elgg_http_add_url_query_elements('action/messageboard/delete', array( |
|
| 142 | 'annotation_id' => $annotation->id, |
|
| 143 | )); |
|
| 144 | ||
| 145 | $options = array( |
|
| 146 | 'name' => 'delete', |
|
| 147 | 'href' => $url, |
|
| 148 | 'text' => elgg_view_icon('delete'), |
|
| 149 | 'confirm' => elgg_echo('deleteconfirm'), |
|
| 150 | 'encode_text' => false |
|
| 151 | ); |
|
| 152 | $return[] = ElggMenuItem::factory($options); |
|
| 153 | } |
|
| 154 | ||
| 155 | return $return; |
|
| 156 | } |
|
| @@ 458-468 (lines=11) @@ | ||
| 455 | $return[] = ElggMenuItem::factory($options); |
|
| 456 | } |
|
| 457 | ||
| 458 | if (elgg_get_plugin_setting('view_count', 'tidypics')) { |
|
| 459 | $view_info = $entity->getViewInfo(); |
|
| 460 | $text = elgg_echo('tidypics:views', array((int)$view_info['total'])); |
|
| 461 | $options = array( |
|
| 462 | 'name' => 'views', |
|
| 463 | 'text' => "<span>$text</span>", |
|
| 464 | 'href' => false, |
|
| 465 | 'priority' => 90, |
|
| 466 | ); |
|
| 467 | $return[] = ElggMenuItem::factory($options); |
|
| 468 | } |
|
| 469 | ||
| 470 | $restrict_tagging = elgg_get_plugin_setting('restrict_tagging', 'tidypics'); |
|
| 471 | if (elgg_get_plugin_setting('tagging', 'tidypics') && elgg_is_logged_in() && (!$restrict_tagging || ($restrict_tagging && $entity->canEdit()))) { |
|
| @@ 1130-1141 (lines=12) @@ | ||
| 1127 | // WIP bookmark objects prototype |
|
| 1128 | // TODO: conditional rendering on only objects + pass a better title sometimes |
|
| 1129 | if(elgg_is_logged_in()) { |
|
| 1130 | if (in_array($entity->getSubtype(), array('comment', 'discussion_reply', 'thewire', 'answer', 'group_profile', 'bookmarks')) || elgg_instanceof($entity, 'user')) {}else{ |
|
| 1131 | $user_guid = elgg_get_logged_in_user_guid(); |
|
| 1132 | $address = urlencode(current_page_url()); |
|
| 1133 | $options = array( |
|
| 1134 | 'name' => 'bookmark', |
|
| 1135 | 'text' => '<span class="fa fa-lg fa-bookmark icon-unsel"></span>', |
|
| 1136 | 'href' => "bookmarks/add/$user_guid?address=$address", |
|
| 1137 | 'title' => elgg_echo('bookmarks:this'), |
|
| 1138 | 'rel' => 'nofollow', |
|
| 1139 | ); |
|
| 1140 | $return[] = \ElggMenuItem::factory($options); |
|
| 1141 | } |
|
| 1142 | } |
|
| 1143 | ||
| 1144 | return $return; |
|