productblock.html.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * The product 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 if(empty($productStats)): ?>
  14. <div class='empty-tip'><?php common::printLink('product', 'create', '', "<i class='icon-plus'></i> " . $lang->product->create, '', "class='btn btn-primary'") ?></div>
  15. <?php else:?>
  16. <style>
  17. .block-products.block-sm .c-execution {display: none;}
  18. </style>
  19. <div class="panel-body has-table scrollbar-hover block-products">
  20. <table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter table-fixed'>
  21. <thead>
  22. <tr>
  23. <th class='c-name'><?php echo $lang->product->name;?></th>
  24. <?php if($longBlock):?>
  25. <th class='c-name c-execution'><?php echo $lang->product->currentExecution;?></th>
  26. <?php endif;?>
  27. <th title='<?php echo $lang->product->plans?>' class='c-num w-120px'><?php echo $lang->product->plans;?></th>
  28. <th title='<?php echo $lang->product->releases?>' class='c-num w-100px'><?php echo $lang->product->releases;?></th>
  29. <th title='<?php echo $lang->product->activeStoriesTitle?>' class='c-num w-120px'><?php echo $lang->product->activeStories;?></th>
  30. <th title='<?php echo $lang->product->unresolvedBugsTitle?>' class='c-num w-100px'><?php echo $lang->product->unresolvedBugs;?></th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. <?php foreach($productStats as $product):?>
  35. <?php
  36. $appid = isset($_GET['entry']) ? "class='app-btn' data-id='{$this->get->entry}'" : "";
  37. $viewLink = $this->createLink('product', 'browse', 'productID=' . $product->id);
  38. ?>
  39. <tr class='text-center' <?php echo $appid?>>
  40. <td class='c-name text-left' title='<?php echo $product->name?>'><?php echo html::a($viewLink, $product->name);?></td>
  41. <?php if($longBlock):?>
  42. <?php $executionName = zget($executions, $product->id, '');?>
  43. <td class='c-name c-execution text-left' title='<?php echo $executionName;?>'><?php echo $executionName;?></td>
  44. <?php endif;?>
  45. <td class="c-num"><?php echo $product->plans?></td>
  46. <td class="c-num"><?php echo $product->releases?></td>
  47. <td class="c-num"><?php echo $product->stories['active']?></td>
  48. <td class="c-num"><?php echo $product->unResolved?></td>
  49. </tr>
  50. <?php endforeach;?>
  51. </tbody>
  52. </table>
  53. </div>
  54. <?php endif;?>