diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-11-17 14:49:00 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-11-17 14:49:00 -0200 |
commit | f092db08f0125d94040487eac8ba4c0950230359 (patch) | |
tree | d45468c41896182454832bc482b705c1cd734863 /muamba-widget.tpl.php | |
parent | 0b268a9ba9201c187c9f83bb21793bb9f2bc7e56 (diff) | |
download | muamba-f092db08f0125d94040487eac8ba4c0950230359.tar.gz muamba-f092db08f0125d94040487eac8ba4c0950230359.tar.bz2 |
Allow request of unavailable items (#42)
Diffstat (limited to 'muamba-widget.tpl.php')
-rw-r--r-- | muamba-widget.tpl.php | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/muamba-widget.tpl.php b/muamba-widget.tpl.php index 9a0916a..34a05cd 100644 --- a/muamba-widget.tpl.php +++ b/muamba-widget.tpl.php @@ -22,13 +22,22 @@ if ($node->uid != $user->uid) { return; } elseif (!$available && $transactions['uid'] != $user->uid) { - $content .= theme('image', - array( - 'path' => $path .'/images/unavailable.png', - 'alt' => t('Item unavailable'), - 'title' => t('Item unavailable'), - ) - ); + if (variable_get('muamba_allow_request_unavailable', FALSE) == TRUE) { + $content .= theme('muamba_widget_icon', array( + 'status' => MUAMBA_REQUESTED, + 'id' => $node->nid, + 'size' => $size, + )); + } + else { + $content .= theme('image', + array( + 'path' => $path .'/images/unavailable.png', + 'alt' => t('Item unavailable'), + 'title' => t('Item unavailable'), + ) + ); + } } elseif ($transactions['uid'] == $user->uid) { $content .= theme('muamba_widget_requester', array( |