aboutsummaryrefslogtreecommitdiff
path: root/muamba-widget.tpl.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-09-23 16:31:58 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-09-23 16:31:58 -0300
commit3b83a67933707f41ba03b763a1728aa4afd6176f (patch)
tree6ad7a98586e29d8dbf64b6d0294e2e2f2bd41fa1 /muamba-widget.tpl.php
parent1459c2923a6f1de73a20466b521fb6e1a627bc45 (diff)
downloadmuamba-3b83a67933707f41ba03b763a1728aa4afd6176f.tar.gz
muamba-3b83a67933707f41ba03b763a1728aa4afd6176f.tar.bz2
Setting widget
Diffstat (limited to 'muamba-widget.tpl.php')
-rw-r--r--muamba-widget.tpl.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/muamba-widget.tpl.php b/muamba-widget.tpl.php
new file mode 100644
index 0000000..ff5c140
--- /dev/null
+++ b/muamba-widget.tpl.php
@@ -0,0 +1,29 @@
+<?php
+
+/**
+ * @file
+ * Template for displaying the muamba widget.
+ *
+ * @todo
+ * Show item status: can it be requested?
+ * Is this item already requested?
+ */
+
+// Add javascript and CSS files
+$path = drupal_get_path('module', 'muamba');
+drupal_add_js($path .'/muamba.js');
+drupal_add_css($path .'/muamba.css');
+
+$icon = theme('image',
+ array(
+ 'path' => $path .'/images/request.png',
+ 'alt' => t('Request item'),
+ 'title' => t('Request item'),
+ )
+);
+
+$output = '<div class="muamba-widget">';
+$output .= l($icon, 'muamba/request/'. $nid, array('html' => TRUE));
+$output .= '</div>';
+
+print $output;