executionblock.html.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * The execution block view file of block module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Yidong Wang <yidong@cnezsoft.com>
  8. * @package block
  9. * @version $Id$
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <style>
  14. .table .c-progress {width: 60px;}
  15. .table .c-estimate {width: 85px;}
  16. .c-hours {text-align: right !important; padding-right: 24px !important;}
  17. .table .c-burn {width: 150px;}
  18. </style>
  19. <?php if(empty($executionStats)): ?>
  20. <div class='empty-tip'><?php common::printLink('execution', 'create', '', "<i class='icon-plus'></i> " . $lang->execution->create, '', "class='btn btn-primary' data-app='execution'")?></div>
  21. <?php else:?>
  22. <div class="panel-body has-table scrollbar-hover">
  23. <table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-projects tablesorter'>
  24. <thead>
  25. <tr class='text-center'>
  26. <th class='c-name text-left'><?php echo $lang->execution->execName;?></th>
  27. <th class="c-date"><?php echo $lang->execution->end;?></th>
  28. <?php if($longBlock):?>
  29. <?php $thClass = common::checkNotCN() ? 'c-estimate' : 'c-hours';?>
  30. <th class="c-status"><?php echo $lang->statusAB;?></th>
  31. <th class='<?php echo $thClass?>'><?php echo $lang->execution->totalEstimate;?></th>
  32. <th class="c-hours"><?php echo $lang->execution->totalLeft;?></th>
  33. <?php endif;?>
  34. <th class="c-progress"><?php echo $lang->execution->progress;?></th>
  35. <?php if($longBlock):?>
  36. <th class="c-burn"><?php echo $lang->execution->burn;?></th>
  37. <?php endif;?>
  38. </tr>
  39. </thead>
  40. <tbody class="text-center">
  41. <?php $id = 0; ?>
  42. <?php foreach($executionStats as $execution):?>
  43. <?php
  44. $appid = isset($_GET['entry']) ? "class='app-btn text-center' data-id='{$this->get->entry}'" : "class='text-center'";
  45. $viewLink = $this->createLink('execution', 'task', 'executionID=' . $execution->id);
  46. ?>
  47. <tr <?php echo $appid?>>
  48. <td class='c-name text-left' title='<?php echo $execution->name;?>'><nobr><?php echo html::a($viewLink, $execution->name, '', "title='$execution->name' class='text-primary'");?></nobr></td>
  49. <td class="c-date"><?php echo $execution->end;?></td>
  50. <?php if($longBlock):?>
  51. <td class="w-70px">
  52. <?php if(isset($execution->delay)):?>
  53. <span class="status-project status-delayed" title='<?php echo $lang->execution->delayed;?>'><?php echo $lang->execution->delayed;?></span>
  54. <?php else:?>
  55. <?php $statusName = $this->processStatus('execution', $execution);?>
  56. <span class="status-project status-<?php echo $execution->status?>" title='<?php echo $statusName;?>'><?php echo $statusName;?></span>
  57. <?php endif;?>
  58. </td>
  59. <td class="c-hours" title="<?php echo $execution->hours->totalEstimate . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalEstimate . $lang->execution->workHourUnit;?></td>
  60. <td class="c-hours" title="<?php echo $execution->hours->totalLeft . ' ' . $lang->execution->workHour;?>"><?php echo $execution->hours->totalLeft . $lang->execution->workHourUnit;?></td>
  61. <?php endif;?>
  62. <td class="c-progress">
  63. <div class='progress-pie' data-doughnut-size='90' data-color='#3CB371' data-value='<?php echo round($execution->hours->progress);?>' data-width='24' data-height='24' data-back-color='#e8edf3'>
  64. <div class='progress-info'><?php echo round($execution->hours->progress);?></div>
  65. </div>
  66. </td>
  67. <?php if($longBlock):?>
  68. <td id='spark-<?php echo $id++?>' class='no-padding text-left sparkline' values='<?php echo join(',', $execution->burns);?>'></td>
  69. <?php endif;?>
  70. </tr>
  71. <?php endforeach;?>
  72. </tbody>
  73. </table>
  74. </div>
  75. <?php endif;?>