aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-15 20:43:39 -0700
committerFriendika <info@friendika.com>2011-06-15 20:43:39 -0700
commite5b54e74ba22b487f816c5a5d16758be34be785a (patch)
tree9dcfe11ddc57e95bb9e0e8aab9c320397f0db11f /include/conversation.php
parent7659f2a87ac5b1de55d0e9f26027fe4f1f05d14b (diff)
downloadvolse-hubzilla-e5b54e74ba22b487f816c5a5d16758be34be785a.tar.gz
volse-hubzilla-e5b54e74ba22b487f816c5a5d16758be34be785a.tar.bz2
volse-hubzilla-e5b54e74ba22b487f816c5a5d16758be34be785a.zip
delete selected items
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php25
1 files changed, 16 insertions, 9 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 9ffcbe157..0d3123831 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -114,6 +114,8 @@ function conversation(&$a, $items, $mode, $update) {
$noshare_tpl = get_markup_template('like_noshare.tpl');
$tpl = get_markup_template('wall_item.tpl');
$wallwall = get_markup_template('wallwall_item.tpl');
+ $droptpl = get_markup_template('wall_item_drop.tpl');
+ $fakedrop = get_markup_template('wall_fake_drop.tpl');
$alike = array();
$dlike = array();
@@ -126,7 +128,6 @@ function conversation(&$a, $items, $mode, $update) {
// - just loop through the items and format them minimally for display
$tpl = get_markup_template('search_item.tpl');
- $droptpl = get_markup_template('wall_fake_drop.tpl');
foreach($items as $item) {
@@ -171,14 +172,7 @@ function conversation(&$a, $items, $mode, $update) {
}
$drop = '';
- $dropping = false;
- if((intval($item['contact-id']) && $item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
- $dropping = true;
-
- $drop = replace_macros((($dropping)? $droptpl : $fakedrop), array('$id' => $item['id'], '$delete' => t('Delete')));
-
- //
localize_item($item);
$drop = replace_macros($droptpl,array('$id' => $item['id']));
@@ -390,7 +384,16 @@ function conversation(&$a, $items, $mode, $update) {
? '<a class="editpost" href="' . $a->get_baseurl() . '/editpost/' . $item['id']
. '" title="' . t('Edit') . '"><img src="images/pencil.gif" /></a>'
: '');
- $drop = replace_macros(get_markup_template('wall_item_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete')));
+
+
+ $drop = '';
+ $dropping = false;
+
+ if((intval($item['contact-id']) && $item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
+ $dropping = true;
+
+ $drop = replace_macros((($dropping)? $droptpl : $fakedrop), array('$id' => $item['id'], '$delete' => t('Delete')));
+
$photo = $item['photo'];
$thumb = $item['thumb'];
@@ -477,6 +480,7 @@ function conversation(&$a, $items, $mode, $update) {
'$comment' => $comment
));
+
$arr = array('item' => $item, 'output' => $tmp_item);
call_hooks('display_item', $arr);
@@ -491,6 +495,9 @@ function conversation(&$a, $items, $mode, $update) {
if($blowhard_count >= 3)
$o .= '</div>';
+ if($dropping)
+ $o .= '<div id="item-delete-selected" class="fakelink" onclick="deleteCheckedItems();"><div id="item-delete-selected-icon" class="icon drophide" title="' . t('Delete Selected Items') . '" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div><div id="item-delete-selected-desc" >' . t('Delete Selected Items') . '</div></div><div id="item-delete-selected-end"></div>';
+
return $o;
}