From 23843e21523a7b2a73c54eff2a71e6a481c56cae Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 7 Nov 2011 20:57:32 -0200 Subject: Adding muamba_widget() for widget handling --- muamba-widget.tpl.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'muamba-widget.tpl.php') diff --git a/muamba-widget.tpl.php b/muamba-widget.tpl.php index 09b43bc..bd856b8 100644 --- a/muamba-widget.tpl.php +++ b/muamba-widget.tpl.php @@ -31,9 +31,7 @@ if ($node->uid != $user->uid) { ); } elseif ($transactions['uid'] == $user->uid) { - foreach (muamba_actions_available('sent', $transactions['status']) as $action) { - $content .= theme('muamba_widget_icon', array('status' => $action, 'id' => $transactions['mid'])); - } + $content .= theme('muamba_widget_requester', array('transaction' => $transactions)); } else { $content .= theme('muamba_widget_icon', array('status' => MUAMBA_REQUESTED, 'id' => $node->nid)); @@ -41,12 +39,7 @@ if ($node->uid != $user->uid) { } else { foreach ($transactions as $transaction) { - $requester = user_load($transaction['uid']); - $content .= t('Request from @name.', array('@name' => $requester->name)); - $content .= '
'; - foreach (muamba_actions_available('received', $transaction['status']) as $action) { - $content .= theme('muamba_widget_icon', array('status' => $action, 'id' => $transaction['mid'])); - } + $content .= theme('muamba_widget_owner', array('transaction' => $transaction)); } } -- cgit v1.2.3