Skip to content

Commit

Permalink
Milesones with no tickets show as 0% complete, now also on view miles…
Browse files Browse the repository at this point in the history
…tone page.
  • Loading branch information
nirix committed Jan 17, 2012
1 parent 8e51dab commit eef5d82
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions system/views/traq.templates/milestone.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@
<td>
<table class="progress" cellspacing="0">
<tr>
<?php if($milestone['tickets']['percent']['closed'] != 0) { ?><td class="closed" width="<?php echo $milestone['tickets']['percent']['closed']?>%"><a href="<?php echo $uri->anchor($project['slug'],'tickets')?>?milestone=<?php echo $milestone['slug']?>&status=closed"></a></td><?php } ?>
<?php if($milestone['tickets']['percent']['open'] != 0) { ?><td class="open" width="<?php echo $milestone['tickets']['percent']['open']?>%"><a href="<?php echo $uri->anchor($project['slug'],'tickets')?>?milestone=<?php echo $milestone['slug']?>&status=open"></a></td><?php } ?>
<?php if($milestone['tickets']['total'] == 0) { ?>
<td class="open">
<a href="<?php echo $uri->anchor($project['slug'],'tickets')?>?milestone=<?php echo $milestone['slug']?>"></a>
</td>
<?php } else { ?>
<?php if($milestone['tickets']['percent']['closed'] != 0) { ?>
<td class="closed" width="<?php echo $milestone['tickets']['percent']['closed']?>%"><a href="<?php echo $uri->anchor($project['slug'],'tickets')?>?milestone=<?php echo $milestone['slug']?>&status=closed"></a></td>
<?php } ?>
<?php if($milestone['tickets']['percent']['open'] != 0) { ?>
<td class="open" width="<?php echo $milestone['tickets']['percent']['open']?>%"><a href="<?php echo $uri->anchor($project['slug'],'tickets')?>?milestone=<?php echo $milestone['slug']?>&status=open"></a></td>
<?php } ?>
<?php } ?>
</tr>
</table>
</td>
<td class="percent"><?php echo $milestone['tickets']['percent']['closed']?>%</td>
<td class="percent">
<?php echo $milestone['tickets']['total'] > 0 ? $milestone['tickets']['percent']['closed'] : 0?>%
</td>
</tr>
</table>
<dl>
Expand Down

0 comments on commit eef5d82

Please sign in to comment.