if ($first_leaderboard['goal_type'] == 'move_deals') { $width = $member['deals_moved'] / $first_leaderboard['amount'] * 100; } //complete_tasks if ($first_leaderboard['goal_type'] == 'complete_tasks') { $width = $member['tasks_completed'] / $first_leaderboard['amount'] * 100; } //write_notes if ($first_leaderboard['goal_type'] == 'write_notes') { $width = $member['notes_written'] / $first_leaderboard['amount'] * 100; } //create_deals if ($first_leaderboard['goal_type'] == 'create_deals') { $width = $member['deals_created'] / $first_leaderboard['amount'] * 100; } echo '<div class="bar" style="background:#' . CobaltHelper::percent2color($width) . ';width:' . $width . '%;"></div>'; echo '</div>'; //output info //win_cash echo '<span class="pull-right">'; if ($first_leaderboard['goal_type'] == 'win_cash') { echo ConfigHelper::getConfigValue('currency') . (int) $member['cash_won'] . ' ' . TextHelper::_('COBALT_CASH_WON'); } //win_deals if ($first_leaderboard['goal_type'] == 'win_deals') { echo (int) $member['deals_won'] . ' ' . TextHelper::_('COBALT_DEALS_WON'); } //move_deals if ($first_leaderboard['goal_type'] == 'move_deals') { echo (int) $member['deals_moved'] . ' ' . TextHelper::_('COBALT_DEALS_MOVED'); }
</span> <?php } ?> </p> </div> <div rel="tooltip" title="<?php echo ucwords(TextHelper::_('COBALT_STAGE')) . ": " . $deal->stage_name; ?> " class="progress"> <?php $light = "#" . CobaltHelper::percent2color($deal->percent); ?> <?php $dark = "#" . CobaltHelper::percent2color($deal->percent - 20); ?> <div class="progress-bar" id="percent_<?php echo $deal->id; ?> " style=" background-image: -moz-linear-gradient(top,<?php echo $light; ?> ,<?php echo $dark; ?> ); background-image: -webkit-gradient(linear,0 0,0 100%,from(<?php echo $light; ?>