aboutsummaryrefslogtreecommitdiff
path: root/muamba.theme.inc
diff options
context:
space:
mode:
Diffstat (limited to 'muamba.theme.inc')
-rw-r--r--muamba.theme.inc36
1 files changed, 32 insertions, 4 deletions
diff --git a/muamba.theme.inc b/muamba.theme.inc
index 8369e6f..03d1c1f 100644
--- a/muamba.theme.inc
+++ b/muamba.theme.inc
@@ -141,9 +141,19 @@ function theme_muamba_widget_icon($variables) {
$id = $variables['id'];
$size = $variables['size'];
$path = drupal_get_path('module', 'muamba');
- $action = muamba_actions($status);
- $image = $path .'/images/icons/'. $size .'/'. $action .'.png';
- $title = ucfirst($action) .' item';
+
+ if ($status != NULL) {
+ $action = muamba_actions($status);
+ $image = $path .'/images/icons/'. $size .'/'. $action .'.png';
+ $title = ucfirst($action) .' item';
+ $action = 'muamba/'. $action;
+ }
+ else {
+ // Default action.
+ $action = 'messages/view';
+ $image = $path .'/images/icons/'. $size .'/messages.png';
+ $title = t('Messages');
+ }
$icon = theme('image',
array(
@@ -153,7 +163,7 @@ function theme_muamba_widget_icon($variables) {
)
);
- $output = l($icon, 'muamba/'. $action .'/'. $id, array('html' => TRUE));
+ $output = l($icon, $action .'/'. $id, array('html' => TRUE));
return $output;
}
@@ -180,6 +190,15 @@ function theme_muamba_widget_owner($variables) {
));
}
+ // Add a message link.
+ if ($variables['messages'] == TRUE) {
+ $content .= theme('muamba_widget_icon', array(
+ 'status' => NULL,
+ 'id' => $transaction['thread_id'],
+ 'size' => $size,
+ ));
+ }
+
return $content;
}
@@ -205,6 +224,15 @@ function theme_muamba_widget_requester($variables) {
));
}
+ // Add a message link.
+ if ($variables['messages'] == TRUE) {
+ $content .= theme('muamba_widget_icon', array(
+ 'status' => NULL,
+ 'id' => $transaction['thread_id'],
+ 'size' => $size,
+ ));
+ }
+
if (!empty($content)) {
return $output . $content;
}