requirementblock.html.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * The requirement 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. <?php $this->app->loadLang('story');?>
  14. <?php if(empty($requirements)): ?>
  15. <div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
  16. <?php else:?>
  17. <style>
  18. .block-stories .c-id {width: 55px;}
  19. .block-stories .c-pri {width: 45px;text-align: center;}
  20. .block-stories .c-estimate {width: 65px; text-align: right;}
  21. .block-stories .c-status {width: 80px;}
  22. .block-stories .c-stage {width: 80px;}
  23. .block-stories.block-sm .estimate,
  24. .block-stories.block-sm .c-stage,
  25. .block-stories.block-sm .c-status {text-align: center;}
  26. </style>
  27. <div class='panel-body has-table scrollbar-hover'>
  28. <table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-stories <?php if(!$longBlock) echo 'block-sm'?>'>
  29. <thead>
  30. <tr>
  31. <?php $title = str_replace($lang->SRCommon, $lang->URCommon, $lang->story->title);?>
  32. <th class="c-id"><?php echo $lang->idAB?></th>
  33. <th class="c-name"><?php echo $title;?></th>
  34. <th class="c-pri"><?php echo $lang->priAB?></th>
  35. <?php if($longBlock):?>
  36. <th class="c-status"><?php echo $lang->statusAB;?></th>
  37. <th class='c-estimate'><?php echo $lang->story->estimateAB;?></th>
  38. <th class='c-stage'><?php echo $lang->story->stageAB;?></th>
  39. <?php endif;?>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. <?php foreach($requirements as $story):?>
  44. <?php
  45. $appid = isset($_GET['entry']) ? "class='app-btn' data-id='{$this->get->entry}'" : '';
  46. $viewLink = $this->createLink('story', 'view', "storyID={$story->id}");
  47. ?>
  48. <tr <?php echo $appid?>>
  49. <td class="c-id-xs"><?php echo sprintf('%03d', $story->id);?></td>
  50. <td class="c-name" style='color: <?php echo $story->color?>' title='<?php echo $story->title?>'><?php echo html::a($viewLink, $story->title);?></td>
  51. <td class="c-pri"><span class="label-pri label-pri-<?php echo $story->pri?>" title="<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>"><?php echo zget($lang->story->priList, $story->pri, $story->pri)?></span></td>
  52. <?php if($longBlock):?>
  53. <?php $status = $this->processStatus('story', $story);?>
  54. <td class='c-status' title='<?php echo $status;?>'>
  55. <span class="status-story status-<?php echo $story->status?>"><?php echo $status;?></span>
  56. </td>
  57. <td class='c-estimate text-center' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit?></td>
  58. <td class='c-stage'>
  59. <span class='story-stage-<?php echo $story->stage?>'>
  60. <?php echo zget($lang->story->stageList, $story->stage, $story->stage);?>
  61. </span>
  62. </td>
  63. <?php endif;?>
  64. </tr>
  65. <?php endforeach;?>
  66. </tbody>
  67. </table>
  68. </div>
  69. <?php endif;?>