/** * Print table header for column sponsorship total * * @param string $p_sort sort * @param string $p_dir direction * @param int $p_columns_target see COLUMNS_TARGET_* in constant_inc.php * @return null * @access public */ function print_column_title_sponsorship_total($p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE) { echo "\t<th class=\"column-sponsorship\">"; print_view_bug_sort_link(sponsorship_get_currency(), 'sponsorship_total', $p_sort, $p_dir, $p_columns_target); print_sort_icon($p_dir, $p_sort, 'sponsorship_total'); echo "</th>\n"; }
function print_column_title_sponsorship_total($p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE) { $t_enable_sponsorship = config_get('enable_sponsorship'); if (ON == $t_enable_sponsorship) { if ($p_columns_target != COLUMNS_TARGET_CSV_PAGE) { echo "\t<td>"; print_view_bug_sort_link(sponsorship_get_currency(), 'sponsorship_total', $p_sort, $p_dir, $p_columns_target); print_sort_icon($p_dir, $p_sort, 'sponsorship_total'); echo "</td>\n"; } else { echo sponsorship_get_currency(); } } }
<?php if ($t_can_sponsor) { ?> <tr class="row-1"> <th class="category" width="15%"><?php echo lang_get('sponsor_issue'); ?> </th> <td> <form method="post" action="bug_set_sponsorship.php"> <?php echo form_security_field('bug_set_sponsorship'); ?> <?php echo sponsorship_get_currency(); ?> <input type="hidden" name="bug_id" value="<?php echo $f_bug_id; ?> " size="4" /> <input type="text" name="amount" value="<?php echo config_get('minimum_sponsorship_amount'); ?> " size="4" /> <input type="submit" class="button" name="sponsor" value="<?php echo lang_get('sponsor_verb'); ?> " /> </form> </td>
/** * This function should return the string in a globalized format. * @param int $p_amount * @return string * @todo add some currency formating in the future */ function sponsorship_format_amount($p_amount) { $t_currency = sponsorship_get_currency(); return $t_currency . ' ' . $p_amount; }
echo ' [<a href="' . $t_details_url . '" target="_blank">' . lang_get( 'sponsorship_more_info' ) . '</a>]'; } ?> </td> </tr> <?php if ( $t_can_sponsor ) { ?> <tr class="row-1"> <th class="category" width="15%"><?php echo lang_get( 'sponsor_issue' ) ?></th> <td> <form method="post" action="bug_set_sponsorship.php"> <?php echo form_security_field( 'bug_set_sponsorship' ) ?> <?php echo sponsorship_get_currency() ?> <input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" size="4" /> <input type="text" name="amount" value="<?php echo config_get( 'minimum_sponsorship_amount' ) ?>" size="4" /> <input type="submit" class="button" name="sponsor" value="<?php echo lang_get( 'sponsor_verb' ) ?>" /> </form> </td> </tr> <?php } $t_total_sponsorship = bug_get_field( $f_bug_id, 'sponsorship_total' ); if ( $t_total_sponsorship > 0 ) { ?> <tr class="row-2"> <th class="category" width="15%"><?php echo lang_get( 'sponsors_list' ) ?></th> <td>
function sponsorship_format_amount($amount) { # @@@ add some currency formating in the future $t_currency = sponsorship_get_currency(); return "{$t_currency} {$amount}"; }