aboutsummaryrefslogtreecommitdiff
path: root/muamba-widget.tpl.php
diff options
context:
space:
mode:
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;