function invoice_view in Invoice 7
Same name and namespace in other branches
- 6 invoice.module \invoice_view()
Implements hook_view()
Parameters
object $node:
string $view_mode:
File
- ./
invoice.module, line 987 - Invoice module
Code
function invoice_view($node, $view_mode) {
$variables = array(
'node' => $node,
'type' => 'view',
);
$body = theme('invoice_body', $variables);
$node->content['body'] = array(
'#markup' => '<div class="view">' . $body . '</div>',
'#weight' => 0,
);
$links = '<div class="invoice-links">';
$links .= _invoice_get_icon('pdf', 'invoice/pdf/' . $node->invoice['invoice_number'], array(
'width' => '30',
'height' => '30',
), 'jpg');
$links .= _invoice_get_icon('print', 'invoice/print/' . $node->invoice['invoice_number'], array(
'width' => '30',
'height' => '30',
), 'jpg');
$links .= '</div>';
$node->content['invoice_links'] = array(
'#markup' => $links,
'#weight' => 1,
);
return $node;
}