uc_payment.theme.inc 757 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @file
  4. * Theme functions for the uc_payment module.
  5. */
  6. /**
  7. * Generates markup for payment totals.
  8. *
  9. * @ingroup themeable
  10. */
  11. function theme_uc_payment_totals($variables) {
  12. $order = $variables['order'];
  13. $line_items = uc_order_load_line_items_display($order);
  14. $output = '<table id="uc-order-total-preview">';
  15. foreach ($line_items as $line) {
  16. if (!empty($line['title'])) {
  17. $attributes = drupal_attributes(array('class' => array('line-item-' . $line['type'])));
  18. $output .= '<tr' . $attributes . '><td class="title">' . filter_xss($line['title']) . ':</td>'
  19. . '<td class="price">' . theme('uc_price', array('price' => $line['amount'])) . '</td></tr>';
  20. }
  21. }
  22. $output .= '</table>';
  23. return $output;
  24. }