view.html.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. /**
  3. * The control file of effort module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2012 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license business(商业软件)
  7. * @author Yangyang Shi <shiyangyang@cnezsoft.com>
  8. * @package effort
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
  15. <div id='mainContent' class='main-content'>
  16. <div class='center-block'>
  17. <div class='main-header'>
  18. <h2>
  19. <span class='label label-id'><?php echo $effort->id;?></span>
  20. <?php echo $lang->effort->view;?>
  21. <?php if($effort->deleted):?>
  22. <span class='label label-danger'><?php echo $lang->effort->deleted;?></span>
  23. <?php endif;?>
  24. </h2>
  25. </div>
  26. <table class='table table-form' id='effort'>
  27. <tbody>
  28. <tr>
  29. <th class='w-90px'><?php echo $lang->effort->account;?></th>
  30. <td><?php echo zget($users, $effort->account);?></td>
  31. </tr>
  32. <tr>
  33. <th class='rowhead'><?php echo $lang->effort->date;?></th>
  34. <td><?php echo date(DT_DATE1, strtotime($effort->date));?></td>
  35. </tr>
  36. <tr>
  37. <th class='rowhead'><?php echo $lang->effort->consumed;?></th>
  38. <td>
  39. <?php
  40. if(isset($effort->consumed)) echo $effort->consumed . ' ' . $lang->effort->hour;
  41. ?>
  42. </td>
  43. </tr>
  44. <?php if($effort->objectType == 'task'):?>
  45. <tr>
  46. <th class='rowhead'><?php echo $lang->effort->left;?></th>
  47. <td>
  48. <?php
  49. if(isset($effort->consumed)) echo $effort->left . ' ' . $lang->effort->hour;
  50. ?>
  51. </td>
  52. </tr>
  53. <?php endif;?>
  54. <tr>
  55. <th class='rowhead'><?php echo $lang->effort->objectType;?></th>
  56. <td>
  57. <?php
  58. echo zget($lang->effort->objectTypeList, $effort->objectType, '');
  59. if($work) echo html::a($this->createLink($effort->objectType, 'view', "objectID={$effort->objectID}"), ' #' . $effort->objectID . ' ' . $work[$effort->objectID]);
  60. ?>
  61. </td>
  62. </tr>
  63. <tr>
  64. <th class='rowhead'><?php echo $lang->effort->work;?></th>
  65. <td>
  66. <?php echo $effort->work;?>
  67. </td>
  68. </tr>
  69. </tbody>
  70. </table>
  71. <?php if(common::canBeChanged('effort', $effort)) $actionFormLink = $this->createLink('action', 'comment', "objectType=effort&objectID=$effort->id");?>
  72. <?php include $app->getModuleRoot() . 'common/view/action.html.php';?>
  73. </div>
  74. </div>
  75. <?php if(!isonlybody()):?>
  76. <div id='mainActions' class='main-actions'>
  77. <nav class='container'></nav>
  78. <div class='btn-toolbar'>
  79. <?php
  80. if($this->session->effortList)
  81. {
  82. $browseLink = $this->session->effortList;
  83. }
  84. elseif($effort->account == $app->user->account)
  85. {
  86. $browseLink = $this->createLink('my', 'effort');
  87. }
  88. else
  89. {
  90. $browseLink = $this->createLink('user', 'effort', "userID=$user->id");
  91. }
  92. ?>
  93. <?php common::printBack($browseLink);?>
  94. <div class='divider'></div>
  95. <?php
  96. if(empty($effort->deleted) && $effort->account == $app->user->account)
  97. {
  98. common::printIcon('effort', 'edit', "effortID=$effort->id");
  99. common::printIcon('effort', 'delete', "effortID=$effort->id", '', 'button', '', 'hiddenwin');
  100. }
  101. ?>
  102. </div>
  103. </div>
  104. <?php endif;?>
  105. <script>
  106. $(function()
  107. {
  108. parent.$('body.hide-modal-close').removeClass('hide-modal-close');
  109. })
  110. </script>
  111. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>