<table cellpadding=0 cellspacing=0 class="<?php echo $key; ?>_percentage" style="margin: 5px 0 10px 0; width: 100%;">
	<?php foreach ($items as $item_id => $item): ?>
		<tr class="hover_highlight">
			<td style="font-weight: normal; font-size: 13px; padding-left: 3px;"><?php echo (is_object($item)) ? $item->getName() : $item; ?></td>
			<td style="text-align: right; font-weight: bold; padding-right: 5px; vertical-align: middle;" title="<?php echo __('%count% issues open of %total_count% issues total', array('%count%' => $counts[$item_id]['open'], '%total_count%' => '('.$counts[$item_id]['open'] + $counts[$item_id]['closed'].')')); ?>"><?php echo $counts[$item_id]['open']; ?>&nbsp;<span style="font-weight: normal;">(<?php echo $counts[$item_id]['open'] + $counts[$item_id]['closed']; ?>)</span></td>
			<td style="width: 40%; vertical-align: middle;"><?php include_template('main/percentbar', array('percent' => 100 - $counts[$item_id]['percentage'], 'height' => 14)); ?></td>
			<td style="text-align: right; font-weight: normal; font-size: 11px; padding-left: 5px; vertical-align: middle; width: 30px;">&nbsp;<?php echo (int) $counts[$item_id]['percentage']; ?>%</td>
		</tr>
	<?php endforeach; ?>
	<tr class="hover_highlight">
		<td style="font-weight: normal; font-size: 13px; padding-left: 3px;" class="faded_out"><?php echo __('Not set'); ?></td>
		<td style="text-align: right; font-weight: bold; padding-right: 5px; vertical-align: middle;" class="faded_out" title="<?php echo __('%count% issues open of %total_count% issues total', array('%count%' => $counts[0]['open'], '%total_count%' => '('.$counts[0]['open'] + $counts[0]['closed'].')')); ?>"><?php echo $counts[0]['open']; ?>&nbsp;<span style="font-weight: normal;">(<?php echo $counts[0]['open'] + $counts[0]['closed']; ?>)</span></td>
		<td style="width: 40%; vertical-align: middle;" class="faded_out"><?php include_template('main/percentbar', array('percent' => 100 - $counts[0]['percentage'], 'height' => 14)); ?></td>
		<td style="text-align: right; font-weight: normal; font-size: 11px; padding-left: 5px; vertical-align: middle;" class="faded_out">&nbsp;<?php echo (int) $counts[0]['percentage']; ?>%</td>
	</tr>
</table>
<?php echo link_tag(make_url('project_statistics', array('project_key' => TBGContext::getCurrentProject()->getKey())), __('Show more statistics'), array('class' => 'button button-silver dash', 'title' => __('More statistics'))); ?>
<?php if ($key != 'workflowstep'): ?>
	<?php echo link_tag(make_url('project_issues', array('project_key' => TBGContext::getCurrentProject()->getKey(), 'search' => true, 'filters[state]' => array('operator' => '=', 'value' => TBGIssue::STATE_OPEN), 'groupby' => $key, 'grouporder' => 'desc')), __('Show details'), array('class' => 'button button-silver dash', 'title' => __('Show more issues'))); ?>
<?php endif; ?>
<br style="clear: both;">
