From fe5d67700ceb54bdc951dbd1f5f98e9dcae89855 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 6 Oct 2011 22:41:35 -0300 Subject: Widget updates --- muamba.theme.inc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'muamba.theme.inc') diff --git a/muamba.theme.inc b/muamba.theme.inc index 4e201f7..a51f6f6 100644 --- a/muamba.theme.inc +++ b/muamba.theme.inc @@ -134,3 +134,27 @@ function theme_muamba_recovered_message($transaction = NULL) { function theme_muamba_lost_message($transaction = NULL) { return t('I declare that my item is lost'); } + +/** + * Theme callback. + */ +function theme_muamba_widget_icon($variables) { + $status = $variables['status']; + $id = $variables['id']; + $path = drupal_get_path('module', 'muamba'); + $action = muamba_actions($status); + $image = $path .'/images/'. $action .'.png'; + $title = ucfirst($action) .' item'; + + $icon = theme('image', + array( + 'path' => $image, + 'alt' => t($title), + 'title' => t($title), + ) + ); + + $output = l($icon, 'muamba/'. $action .'/'. $id, array('html' => TRUE)); + + return $output; +} -- cgit v1.2.3