issues.php 606 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. global $context;
  3. ?>
  4. <div>
  5. <h3>Issues</h3>
  6. <?php
  7. if(
  8. (
  9. $context instanceof Project &&
  10. $context->permission('issue.create')
  11. ) ||
  12. (
  13. !$context instanceof Project &&
  14. Bugs::permission('issue.create')
  15. )
  16. ){
  17. ?>
  18. <a href="<?=Router::url(Router::$base.($context instanceof Project?"/project/{$context->name}/":'').'/create/issue')?>">New</a>
  19. <?php
  20. }
  21. ?>
  22. <ul>
  23. <?php
  24. foreach($context->issues as $issue){
  25. echo "<li>({$issue->status} - {$issue->priority}) <a href=\"".Router::url(Router::$base."/!{$issue->id}")."\">{$issue->name}</a></li>";
  26. }
  27. ?>
  28. </ul>
  29. </div>