review.html.php 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  2. <style>#bugList td {overflow:hidden;text-overflow:ellipsis;white-space: nowrap;}</style>
  3. <?php js::set('browseType', $browseType);?>
  4. <div id="mainMenu" class="clearfix">
  5. <div class="btn-toolbar pull-left">
  6. <?php
  7. foreach(customModel::getFeatureMenu('repo', 'review') as $menuItem)
  8. {
  9. echo html::a($this->repo->createLink('review', "repoID=$repoID&browseType={$menuItem->name}"), "<span class='text'>{$menuItem->text}</span>", '', "id='{$menuItem->name}Tab' class='btn btn-link' data-app='{$app->tab}'");
  10. }
  11. ?>
  12. </div>
  13. </div>
  14. <div id='mainContent' class='main-table' data-ride='table'>
  15. <table class='table' id='bugList'>
  16. <thead>
  17. <tr class="colhead">
  18. <th class="c-id"><?php echo 'ID';?></th>
  19. <th><?php echo $lang->repo->title?></th>
  20. <th class='w-300px'><?php echo $lang->repo->file . '/' . $lang->repo->location?></th>
  21. <th class='w-100px'><?php echo $lang->repo->revisionA?></th>
  22. <th class='w-80px'><?php echo $lang->repo->type?></th>
  23. <th class='w-80px'><?php echo $lang->repo->status?></th>
  24. <th class='w-100px'><?php echo $lang->repo->openedBy?></th>
  25. <th class='w-100px'><?php echo $lang->repo->assignedTo?></th>
  26. <th class='w-120px'><?php echo $lang->repo->openedDate?></th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. <?php foreach($bugs as $bug):?>
  31. <tr>
  32. <td><?php echo sprintf('%03d', $bug->id);?></td>
  33. <?php $lines = explode(',', trim($bug->lines, ','));?>
  34. <td><?php echo html::a($this->createLink('bug', 'view', "bugID={$bug->id}&from=repo"), $bug->title, '', "data-app='qa'")?></td>
  35. <td>
  36. <?php
  37. echo "<span class='label label-info'>$bug->lines</span> ";
  38. $entry = $repo->name . '/' . $this->repo->decodePath($bug->entry);
  39. if(empty($bug->v1))
  40. {
  41. $revision = $repo->SCM != 'Subversion' ? $this->repo->getGitRevisionName($bug->v2, (int)zget($historys, $bug->v2)) : $bug->v2;
  42. $link = $this->repo->createLink('view', "repoID=$repoID&objectID=0&entry={$bug->entry}&revision={$bug->v2}") . "#L$lines[0]";
  43. }
  44. else
  45. {
  46. $revision = $repo->SCM != 'Subversion' ? substr($bug->v1, 0, 10) : $bug->v1;
  47. $revision .= ' : ';
  48. $revision .= $repo->SCM != 'Subversion' ? substr($bug->v2, 0, 10) : $bug->v2;
  49. if($repo->SCM != 'Subversion') $revision .= ' (' . zget($historys, $bug->v1) . ' : ' . zget($historys, $bug->v2) . ')';
  50. $link = $this->repo->createLink('diff', "repoID=$repoID&objectID=0&entry={$bug->entry}&oldRevision={$bug->v1}&newRevision={$bug->v2}") . "#L$lines[0]";
  51. }
  52. echo html::a($link, $entry, '', "title='{$entry}' data-app='{$app->tab}'");
  53. ?>
  54. </td>
  55. <td><?php echo $repo->SCM != 'Subversion' ? substr(strtr($bug->v2, '*', '-'), 0, 10) : $bug->v2?></td>
  56. <td><?php echo isset($lang->repo->typeList[$bug->repoType]) ? $lang->repo->typeList[$bug->repoType] : ''?></td>
  57. <td class='bug-<?php echo $bug->status?>'><?php echo $lang->bug->statusList[$bug->status]?></td>
  58. <td><?php echo zget($users, $bug->openedBy)?></td>
  59. <td><?php echo zget($users, $bug->assignedTo)?></td>
  60. <td><?php echo substr($bug->openedDate, 5, 11)?></td>
  61. </tr>
  62. <?php endforeach;?>
  63. </tbody>
  64. </table>
  65. <?php if($bugs):?>
  66. <div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
  67. <?php endif;?>
  68. </div>
  69. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>