/** * Print a table of issues. * * @param array $issues An array of issues to display. * * @return void */ function print_issues($state, $issues) { $icount = count($issues); if ($icount) { ?> <h2 class="issuehed"><?php echo $icount; ?> <?php echo $state; ?> issue<?php echo $icount == 1 ? '' : 's'; ?> </h2> <table> <thead> <tr> <th scope="col">Issue</th> <th scope="col">Description</th> <th scope="col">Author</th> <th scope="col">Last Modified</th> </tr> </thead> <tbody> <?php foreach ($issues as $i) { ?> <tr> <td><?php echo $i->number; ?> </td> <th scope="row"> <a href="<?php echo $i->html_url; ?> "><?php echo htmlspecialchars($i->title, ENT_QUOTES, 'UTF-8'); ?> <?php if ($i->comments > 0) { ?> <b class="comments"><?php echo htmlspecialchars($i->comments, ENT_QUOTES, 'UTF-8'); ?> comment<?php echo $i->comments == 1 ? '' : 's'; ?> </b><?php } ?> </a> </th> <?php //<td class="label">Enhancement</td> ?> <td><a href="https://github.com/<?php echo htmlspecialchars($i->user->login, ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($i->user->login, ENT_QUOTES, 'UTF-8'); ?> </a></td> <td><?php echo days_passed($i->updated_at); ?> </td> </tr> <?php } ?> </tbody> </table> <?php } }
/** * Print a table of issues. * * @param array $issues An array of issues to display. * * @return void */ function print_issues($state, $issues) { $icount = count($issues); if( $icount ) { ?><h2 class="issuehed"><?=$icount?> <?=$state?> issue<?=$icount == 1 ? '' : 's'?></h2> <table> <thead> <tr> <th scope="col">Issue</th> <th scope="col">Description</th> <th scope="col">Author</th> <th scope="col">Last Modified</th> </tr> </thead> <tbody> <? foreach( $issues as $i ):?> <tr> <td><?=$i->number?></td> <th scope="row"> <a href="<?=$i->html_url?>"><?=$i->title?> <?if( $i->comments > 0 ):?><b class="comments"><?=$i->comments?> comment<?=$i->comments == 1 ? '' : 's' ?></b><?endif?> </a> </th> <?//<td class="label">Enhancement</td>?> <td><a href="https://github.com/<?$i->user->login?>"><?=$i->user->login?></a></td> <td><?=days_passed( $i->updated_at )?></td> </tr> <?endforeach;?> </tbody> </table> <? } }