ajaxgetrelationinfo.html.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. /**
  3. * The create view file of repo module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @author Yanyi Cao
  7. * @package repo
  8. * @version $Id: ajaxgetcommitrelation.html.php $
  9. */
  10. ?>
  11. <?php
  12. include '../../common/view/header.lite.html.php';
  13. js::set('objectType', $objectType);
  14. js::set('objectID', zget($object, 'id', ''));
  15. ?>
  16. <div class="main-col linkContent main">
  17. <div class="content pane">
  18. <div class="fade main-row split-row in col-md-12">
  19. <div class="left-content col-md-8">
  20. <table class="table table-borderless">
  21. <?php if($objectType == 'story'):?>
  22. <tr>
  23. <td class="text">
  24. <strong class='text-primary'><?php echo zget($object, 'title', '');?></strong>
  25. </td>
  26. </tr>
  27. <tr>
  28. <td class="text">
  29. <div class="spec-content detail-content article-content">
  30. <?php echo zget($object, 'spec', ''); ?>
  31. </div>
  32. </td>
  33. </tr>
  34. <tr>
  35. <td class="text">
  36. <div class="detail-content article-content">
  37. <?php echo zget($object, 'verify', ''); ?>
  38. </div>
  39. </td>
  40. </tr>
  41. <?php elseif($objectType == 'task'):?>
  42. <tr>
  43. <td class="text">
  44. <strong class='text-primary'><?php echo zget($object, 'name', '');?></strong>
  45. </td>
  46. </tr>
  47. <tr>
  48. <td class="text">
  49. <div class="spec-content detail-content article-content">
  50. <?php echo zget($object, 'desc', ''); ?>
  51. </div>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td class="text">
  56. <div class="detail-content article-content">
  57. <?php echo zget($object, 'storyTitle', ''); ?>
  58. </div>
  59. </td>
  60. </tr>
  61. <?php elseif($objectType == 'bug'):?>
  62. <tr>
  63. <td class="text">
  64. <strong class='text-primary' data-id='<?php echo zget($object, 'id', '');?>'><?php echo zget($object, 'title', '');?></strong>
  65. </td>
  66. </tr>
  67. <?php if(zget($object, 'steps', '')):?>
  68. <tr>
  69. <td class="text">
  70. <div class="spec-content detail-content article-content">
  71. <?php echo zget($object, 'steps', ''); ?>
  72. </div>
  73. </td>
  74. </tr>
  75. <?php endif;?>
  76. <?php endif;?>
  77. </table>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <?php include '../../common/view/footer.lite.html.php';?>
  83. <script>
  84. $(function()
  85. {
  86. $('a').each(function()
  87. {
  88. var content = $(this).html();
  89. $(this).replaceWith(content);
  90. })
  91. $('blockquote a').empty();
  92. $('.linkContent strong.text-primary').on('click',function()
  93. {
  94. var link = createLink(objectType, 'view', objectType + 'ID=' + objectID);
  95. var app = objectType == 'bug' ? 'qa' : (objectType == 'task' ? 'execution' : 'product');
  96. parent.parent.$.apps.open(link, app);
  97. });
  98. });
  99. </script>