aboutsummaryrefslogtreecommitdiff
path: root/muamba.theme.inc
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-10-06 22:41:35 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-10-06 22:41:35 -0300
commitfe5d67700ceb54bdc951dbd1f5f98e9dcae89855 (patch)
tree9ec00b088f2cb2b65ea62950d87754094f0d7e73 /muamba.theme.inc
parentfc44d53e2538655f2859cfe1b7566b6db44cdcfb (diff)
downloadmuamba-fe5d67700ceb54bdc951dbd1f5f98e9dcae89855.tar.gz
muamba-fe5d67700ceb54bdc951dbd1f5f98e9dcae89855.tar.bz2
Widget updates
Diffstat (limited to 'muamba.theme.inc')
-rw-r--r--muamba.theme.inc24
1 files changed, 24 insertions, 0 deletions
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;
+}