You are here

function theme_contribute_user_contributions in Contribute 6

1 call to theme_contribute_user_contributions()
contribute_user in ./contribute.module

File

./contribute.module, line 305
Lets users contribute to projects

Code

function theme_contribute_user_contributions($contributions) {
  $output = '<table class="user-contribution-list">';
  $output .= '<tr class=contribution-list-header>';
  $output .= '<th>contribution ID</th><th>Nid</th><th>Title</th><th>Amount</th><th>Made On</th></tr>';
  $zebra = 'odd';
  foreach ($contributions as $contribution) {
    $node = node_load($contribution['nid']);
    $output .= '<tr class="' . $zebra . '">';
    $output .= '<td class="id" align="center">' . check_plain($contribution['id']) . '</td>';
    $output .= '<td class="nid" align="center">' . check_plain($contribution['nid']) . '</td>';
    $output .= '<td class="title">' . check_plain($node->title) . '</td>';
    $output .= '<td class="amount" align="center">$' . check_plain($contribution['amount']) . '</td>';
    $output .= '<td class="created">' . date('M d Y h:i', check_plain($contribution['created'])) . '</td>';
    $zebra = $zebra == 'odd' ? 'even' : 'odd';
  }
  $output .= "</table>";
  return $output;
}