view.html.php 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. <?php
  2. /**
  3. * The view file of release module's view method 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 Chunsheng Wang <chunsheng@cnezsoft.com>
  8. * @package release
  9. * @version $Id: view.html.php 4386 2013-02-19 07:37:45Z chencongzhi520@gmail.com $
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <?php include '../../common/view/header.html.php';?>
  14. <?php include '../../common/view/tablesorter.html.php';?>
  15. <?php js::set('confirmUnlinkStory', $lang->release->confirmUnlinkStory)?>
  16. <?php js::set('confirmUnlinkBug', $lang->release->confirmUnlinkBug)?>
  17. <?php js::set('storySummary', $summary);?>
  18. <?php js::set('storyCommon', $lang->SRCommon);?>
  19. <?php js::set('checkedSummary', $lang->product->checkedSRSummary);?>
  20. <div id='mainMenu' class='clearfix'>
  21. <div class='btn-toolbar pull-left'>
  22. <?php $browseLink = $this->session->releaseList ? $this->session->releaseList : inlink('browse', "productID=$release->product");?>
  23. <?php common::printBack($browseLink, 'btn btn-primary');?>
  24. <div class='divider'></div>
  25. <div class='page-title'>
  26. <span class='label label-id'><?php echo $release->id;?></span>
  27. <span class='text' title='<?php echo $release->name;?>'><?php echo $release->name;?></span>
  28. <?php $flagIcon = $release->marker ? "<icon class='icon icon-flag red' title='{$lang->release->marker}'></icon> " : '';?>
  29. <?php echo $flagIcon;?>
  30. <?php if($release->deleted):?>
  31. <span class='label label-danger'><?php echo $lang->release->deleted;?></span>
  32. <?php endif; ?>
  33. </div>
  34. </div>
  35. <?php $canBeChanged = common::canBeChanged('projectrelease', $release);?>
  36. <div class='btn-toolbar pull-right'><?php echo $this->projectrelease->buildOperateMenu($release, 'view');?></div>
  37. </div>
  38. <div id='mainContent' class='main-content'>
  39. <div class='main-col'>
  40. <div class='main'>
  41. <div class='tabs' id='tabsNav'>
  42. <?php $countBugs = count($bugs); $countLeftBugs = count($leftBugs);?>
  43. <ul class='nav nav-tabs'>
  44. <li <?php if($type == 'story') echo "class='active'"?>><a href='#stories' data-toggle='tab'><?php echo html::icon($lang->icons['story'], 'text-green') . ' ' . $lang->release->stories;?></a></li>
  45. <li <?php if($type == 'bug') echo "class='active'"?>><a href='#bugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-green') . ' ' . $lang->release->bugs;?></a></li>
  46. <li <?php if($type == 'leftBug') echo "class='active'"?>><a href='#leftBugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-red') . ' ' . $lang->release->generatedBugs;?></a></li>
  47. <li <?php if($type == 'releaseInfo') echo "class='active'"?>><a href='#releaseInfo' data-toggle='tab'><?php echo html::icon($lang->icons['plan'], 'text-info') . ' ' . $lang->release->view;?></a></li>
  48. <?php if($summary or $countBugs or $countLeftBugs):?>
  49. <li class='pull-right'><div><?php common::printIcon('projectrelease', 'export', "releaseID=$release->id", '', 'button', '', '', "export btn-sm");?></div></li>
  50. <?php endif;?>
  51. </ul>
  52. <div class='tab-content'>
  53. <div class='tab-pane <?php if($type == 'story') echo 'active'?>' id='stories'>
  54. <?php if(common::hasPriv('projectrelease', 'linkStory') and $canBeChanged and !isonlybody()):?>
  55. <div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"story\")", '<i class="icon-link"></i> ' . $lang->release->linkStory, '', "class='btn btn-primary'");?></div>
  56. <div class='linkBox cell hidden'></div>
  57. <?php endif;?>
  58. <form class='main-table table-story' method='post' id='linkedStoriesForm' data-ride="">
  59. <table class='table has-sort-head' id='storyList'>
  60. <?php
  61. $canBatchUnlink = common::hasPriv('projectrelease', 'batchUnlinkStory');
  62. $canBatchClose = common::hasPriv('story', 'batchClose');
  63. ?>
  64. <?php $vars = "releaseID={$release->id}&type=story&link=$link&param=$param&orderBy=%s";?>
  65. <thead>
  66. <tr class='text-center'>
  67. <th class='c-id text-left'>
  68. <?php if(($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
  69. <div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
  70. <label></label>
  71. </div>
  72. <?php endif;?>
  73. <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
  74. </th>
  75. <th class="text-left"><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
  76. <th class='c-pri' title='<?php echo $lang->pri;?>'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
  77. <th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
  78. <th class='c-build'> <?php echo $lang->build->linkedBuild;?></th>
  79. <th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
  80. <th class='c-estimate'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
  81. <th class='c-stage'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
  82. <th class='c-actions-1'><?php echo $lang->actions?></th>
  83. </tr>
  84. </thead>
  85. <tbody class='text-center'>
  86. <?php foreach($stories as $storyID => $story):?>
  87. <?php $storyLink = $this->createLink('story', 'view', "storyID=$story->id&version=0&param={$this->session->project}", '', true);?>
  88. <tr data-id='<?php echo $story->id;?>' data-estimate='<?php echo $story->estimate?>' <?php if(!empty($story->children)) echo "data-children=" . count($story->children);?> data-cases='<?php echo zget($storyCases, $story->id, 0);?>'>
  89. <td class='c-id text-left'>
  90. <?php if(($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
  91. <div class="checkbox-primary">
  92. <input type='checkbox' name='storyIdList[]' value='<?php echo $story->id;?>'/>
  93. <label></label>
  94. </div>
  95. <?php endif;?>
  96. <?php echo sprintf('%03d', $story->id);?>
  97. </td>
  98. <td class='text-left nobr' title='<?php echo $story->title?>'>
  99. <?php
  100. if($story->parent > 0) echo "<span class='label label-badge label-light'>{$lang->story->childrenAB}</span>";
  101. echo html::a($storyLink,$story->title, '', "class='preview'");
  102. ?>
  103. </td>
  104. <td><span class='label-pri <?php echo 'label-pri-' . $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>
  105. <td>
  106. <span class='status-story status-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></span>
  107. </td>
  108. <td class='c-build' title='<?php echo $story->buildName?>'><?php echo $story->buildName?></td>
  109. <td class='c-user'><?php echo zget($users, $story->openedBy);?></td>
  110. <td class='c-estimate' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
  111. <td class='c-stage'><?php echo $lang->story->stageList[$story->stage];?></td>
  112. <td class='c-actions'>
  113. <?php
  114. if(common::hasPriv('projectrelease', 'unlinkStory') and $canBeChanged)
  115. {
  116. $unlinkURL = $this->createLink('projectrelease', 'unlinkStory', "releaseID=$release->id&story=$story->id");
  117. echo html::a($unlinkURL, '<i class="icon-unlink"></i>', 'hiddenwin', "class='btn' title='{$lang->release->unlinkStory}'");
  118. }
  119. ?>
  120. </td>
  121. </tr>
  122. <?php endforeach;?>
  123. </tbody>
  124. </table>
  125. <div class='table-footer'>
  126. <?php if($summary and ($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
  127. <div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
  128. <div class="table-actions btn-toolbar">
  129. <?php
  130. if(common::hasPriv('projectrelease', 'batchUnlinkStory'))
  131. {
  132. $unlinkURL = inlink('batchUnlinkStory', "release=$release->id");
  133. echo html::a('###', $lang->release->batchUnlink, '', "onclick='setFormAction(\"$unlinkURL\", \"hiddenwin\", this)' class='btn'");
  134. }
  135. if(common::hasPriv('story', 'batchClose'))
  136. {
  137. $closeURL = $this->createLink('story', 'batchClose');
  138. echo html::a("###", $lang->story->batchClose, '', "onclick='setFormAction(\"$closeURL\", \"\", this)' class='btn'");
  139. }
  140. ?>
  141. </div>
  142. <?php endif;?>
  143. <?php if($this->app->getViewType() != 'xhtml'):?>
  144. <div class='table-statistic'><?php echo $summary;?></div>
  145. <?php endif;?>
  146. <?php
  147. $this->app->rawParams['type'] = 'story';
  148. $storyPager->show('right', 'pagerjs');
  149. $this->app->rawParams['type'] = $type;
  150. ?>
  151. </div>
  152. </form>
  153. </div>
  154. <div class='tab-pane <?php if($type == 'bug') echo 'active'?>' id='bugs'>
  155. <?php if(common::hasPriv('projectrelease', 'linkBug') and $canBeChanged and !isonlybody()):?>
  156. <div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"bug\")", '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-primary'");?></div>
  157. <div class='linkBox cell hidden'></div>
  158. <?php endif;?>
  159. <form class='main-table table-bug' method='post' target='hiddenwin' id='linkedBugsForm' data-ride="table">
  160. <table class='table has-sort-head' id='bugList'>
  161. <?php $canBatchUnlink = common::hasPriv('projectrelease', 'batchUnlinkBug');?>
  162. <?php $canBatchClose = common::hasPriv('bug', 'batchClose');?>
  163. <?php $vars = "releaseID={$release->id}&type=bug&link=$link&param=$param&orderBy=%s";?>
  164. <thead>
  165. <tr class='text-center'>
  166. <th class='c-id text-left w-110px'>
  167. <?php if($canBatchUnlink and $canBeChanged):?>
  168. <div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
  169. <label></label>
  170. </div>
  171. <?php endif;?>
  172. <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
  173. </th>
  174. <th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
  175. <th class='w-100px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
  176. <th class='c-build'> <?php echo $lang->bug->resolvedBuild;?></th>
  177. <th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
  178. <th class='c-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->abbr->openedDate);?></th>
  179. <th class='c-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedBy);?></th>
  180. <th class='c-date'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->abbr->resolvedDate);?></th>
  181. <th class='w-60px'> <?php echo $lang->actions;?></th>
  182. </tr>
  183. </thead>
  184. <tbody class='text-center'>
  185. <?php foreach($bugs as $bug):?>
  186. <?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
  187. <tr>
  188. <td class='c-id text-left'>
  189. <?php if(($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
  190. <div class="checkbox-primary">
  191. <input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
  192. <label></label>
  193. </div>
  194. <?php endif;?>
  195. <?php echo sprintf('%03d', $bug->id);?>
  196. </td>
  197. <td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($bugLink, $bug->title, '', "class='preview'");?></td>
  198. <td>
  199. <span class='status-bug status-<?php echo $bug->status?>'><?php echo $this->processStatus('bug', $bug);?></span>
  200. </td>
  201. <?php $resolvedBuildName = zget($builds, $bug->resolvedBuild, '');?>
  202. <td class='c-build' title='<?php echo $resolvedBuildName?>'><?php echo $resolvedBuildName;?></td>
  203. <td class='c-user'><?php echo zget($users, $bug->openedBy);?></td>
  204. <td class='c-date'><?php echo helper::isZeroDate($bug->openedDate) ? '' : substr($bug->openedDate, 5, 11);?></td>
  205. <td class='c-user'><?php echo zget($users, $bug->resolvedBy);?></td>
  206. <td class='c-date'><?php echo helper::isZeroDate($bug->resolvedDate) ? '' : substr($bug->resolvedDate, 5, 11);?></td>
  207. <td class='c-actions'>
  208. <?php
  209. if(common::hasPriv('projectrelease', 'unlinkBug') and $canBeChanged)
  210. {
  211. $unlinkURL = $this->createLink('projectrelease', 'unlinkBug', "releaseID=$release->id&bug=$bug->id");
  212. echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkBug}'");
  213. }
  214. ?>
  215. </td>
  216. </tr>
  217. <?php endforeach;?>
  218. </tbody>
  219. </table>
  220. <div class='table-footer'>
  221. <?php if($countBugs and ($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
  222. <div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
  223. <div class="table-actions btn-toolbar">
  224. <?php
  225. if($canBatchUnlink and $canBeChanged)
  226. {
  227. $unlinkURL = $this->createLink('projectrelease', 'batchUnlinkBug', "releaseID=$release->id");
  228. echo html::a("###", $lang->release->batchUnlink, '', "onclick='setFormAction(\"$unlinkURL\", \"hiddenwin\", this)' class='btn'");
  229. }
  230. if($canBatchClose and $canBeChanged)
  231. {
  232. $closeURL = $this->createLink('bug', 'batchClose', "releaseID=$release->id&viewType=projectrelease");
  233. echo html::a("###", $lang->story->batchClose, '', "onclick='setFormAction(\"$closeURL\", \"hiddenwin\", this)' class='btn'");
  234. }
  235. ?>
  236. </div>
  237. <div class='table-statistic'><?php echo sprintf($lang->release->resolvedBugs, $countBugs);?></div>
  238. <?php endif;?>
  239. <?php
  240. $this->app->rawParams['type'] = 'bug';
  241. $bugPager->show('right', 'pagerjs');
  242. $this->app->rawParams['type'] = $type;
  243. ?>
  244. </div>
  245. </form>
  246. </div>
  247. <div class='tab-pane <?php if($type == 'leftBug') echo 'active'?>' id='leftBugs'>
  248. <?php if(common::hasPriv('projectrelease', 'linkBug') and $canBeChanged and !isonlybody()):?>
  249. <div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"leftBug\")", '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-primary'");?></div>
  250. <div class='linkBox cell hidden'></div>
  251. <?php endif;?>
  252. <form class='main-table table-bug' method='post' target='hiddenwin' action="<?php echo inlink('batchUnlinkBug', "releaseID=$release->id&type=leftBug");?>" id='linkedBugsForm' data-ride="table">
  253. <table class='table has-sort-head' id='leftBugList'>
  254. <?php $canBatchUnlink = common::hasPriv('projectrelease', 'batchUnlinkBug');?>
  255. <?php $vars = "releaseID={$release->id}&type=leftBug&link=$link&param=$param&orderBy=%s";?>
  256. <thead>
  257. <tr class='text-center'>
  258. <th class='c-id text-left'>
  259. <?php if($canBatchUnlink and $canBeChanged):?>
  260. <div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
  261. <label></label>
  262. </div>
  263. <?php endif;?>
  264. <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
  265. </th>
  266. <th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
  267. <th class='w-80px' title=<?php echo $lang->bug->severity;?>><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->abbr->severity);?></th>
  268. <th class='w-100px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
  269. <th class='c-build'><?php echo $lang->bug->openedBuild;?></th>
  270. <th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
  271. <th class='c-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->abbr->openedDate);?></th>
  272. <th class='w-60px'> <?php echo $lang->actions;?></th>
  273. </tr>
  274. </thead>
  275. <?php
  276. $hasCustomSeverity = false;
  277. foreach($lang->bug->severityList as $severityKey => $severityValue)
  278. {
  279. if(!empty($severityKey) and (string)$severityKey != (string)$severityValue)
  280. {
  281. $hasCustomSeverity = true;
  282. break;
  283. }
  284. }
  285. ?>
  286. <tbody class='text-center'>
  287. <?php foreach($leftBugs as $bug):?>
  288. <?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
  289. <tr>
  290. <td class='c-id text-left'>
  291. <?php if($canBatchUnlink and $canBeChanged):?>
  292. <div class="checkbox-primary">
  293. <input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
  294. <label></label>
  295. </div>
  296. <?php endif;?>
  297. <?php echo sprintf('%03d', $bug->id);?>
  298. </td>
  299. <td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($bugLink, $bug->title, '', "class='preview'");?></td>
  300. <td class='c-severity'>
  301. <?php if($hasCustomSeverity):?>
  302. <span class='<?php echo 'label-severity-custom';?>' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo $bug->severity;?>'><?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?></span>
  303. <?php else:?>
  304. <span class='label-severity' data-severity='<?php echo $bug->severity;?>' title='<?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?>'></span>
  305. <?php endif;?>
  306. </td>
  307. <td><span class='status-<?php echo $bug->status?>'> <?php echo $this->processStatus('bug', $bug);?></span></td>
  308. <?php
  309. $openedBuildName = '';
  310. foreach(explode(',', $bug->openedBuild) as $buildID) $openedBuildName .= zget($builds, $buildID, '') . ' ';
  311. ?>
  312. <td class='c-build' title='<?php echo $openedBuildName?>'><?php echo $openedBuildName;?></td>
  313. <td class='c-user'><?php echo zget($users, $bug->openedBy);?></td>
  314. <td class='c-date'><?php echo helper::isZeroDate($bug->openedDate) ? '' : substr($bug->openedDate, 5, 11);?></td>
  315. <td class='c-actions'>
  316. <?php
  317. if(common::hasPriv('projectrelease', 'unlinkBug') and $canBeChanged)
  318. {
  319. $unlinkURL = $this->createLink('projectrelease', 'unlinkBug', "releaseID=$release->id&bug=$bug->id&type=leftBug");
  320. echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"leftBugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkBug}'");
  321. }
  322. ?>
  323. </td>
  324. </tr>
  325. <?php endforeach;?>
  326. </tbody>
  327. </table>
  328. <div class='table-footer'>
  329. <?php if($countLeftBugs and $canBatchUnlink and $canBeChanged):?>
  330. <div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
  331. <div class="table-actions btn-toolbar">
  332. <?php echo html::submitButton($lang->release->batchUnlink, '', 'btn');?>
  333. </div>
  334. <div class='table-statistic'><?php echo sprintf($lang->release->createdBugs, $countLeftBugs);?></div>
  335. <?php endif;?>
  336. <?php
  337. $this->app->rawParams['type'] = 'leftBug';
  338. $leftBugPager->show('right', 'pagerjs');
  339. $this->app->rawParams['type'] = $type;
  340. ?>
  341. </div>
  342. </form>
  343. </div>
  344. <div class='tab-pane <?php if($type == 'releaseInfo') echo 'active'?>' id='releaseInfo'>
  345. <div class='cell'>
  346. <div class='detail'>
  347. <div class='detail-title'><?php echo $lang->release->basicInfo?></div>
  348. <div class='detail-content'>
  349. <table class='table table-data'>
  350. <?php if($project->hasProduct):?>
  351. <tr>
  352. <th class='w-100px'><?php echo $lang->release->product;?></th>
  353. <td><?php echo $release->productName;?></td>
  354. </tr>
  355. <?php endif;?>
  356. <tr>
  357. <th class='w-90px'><?php echo $lang->release->name;?></th>
  358. <td><?php echo $release->name;?></td>
  359. </tr>
  360. <tr>
  361. <th><?php echo $lang->release->includedBuild;?></th>
  362. <td>
  363. <?php
  364. $buildHtml = array();
  365. foreach($release->buildInfos as $buildID => $buildInfo)
  366. {
  367. $buildHtml[] = html::a($this->createLink($buildInfo->execution ? 'build' : 'projectbuild', 'view', "buildID=$buildID"), $buildInfo->name, '', "data-app='project'");
  368. }
  369. echo join($lang->comma, $buildHtml);
  370. ?>
  371. </td>
  372. </tr>
  373. <?php if($product->type != 'normal'):?>
  374. <tr>
  375. <th><?php echo $lang->release->branch;?></th>
  376. <td>
  377. <?php
  378. foreach($release->branches as $branchID)
  379. {
  380. echo zget($branches, $branchID, '');
  381. if($branchID != end($release->branches)) echo ', ';
  382. }
  383. ?>
  384. </td>
  385. </tr>
  386. <?php endif;?>
  387. <tr>
  388. <th><?php echo $lang->release->status;?></th>
  389. <td><?php echo $this->processStatus('release', $release);?></td>
  390. </tr>
  391. <tr>
  392. <th><?php echo $lang->release->date;?></th>
  393. <td><?php echo $release->date;?></td>
  394. </tr>
  395. <?php $this->printExtendFields($release, 'table', 'inForm=0');?>
  396. <tr>
  397. <th><?php echo $lang->release->desc;?></th>
  398. <td><?php echo $release->desc;?></td>
  399. </tr>
  400. </table>
  401. </div>
  402. </div>
  403. <div class='detail'>
  404. <div class='detail-title'><?php echo $lang->files?></div>
  405. <div class='detail-content article-content'>
  406. <?php
  407. if($release->files) echo $this->fetch('file', 'printFiles', array('files' => $release->files, 'fieldset' => 'false'));
  408. foreach($release->buildInfos as $buildID => $buildInfo)
  409. {
  410. if($buildInfo->filePath) echo $lang->release->filePath . html::a($buildInfo->filePath, $buildInfo->filePath, '_blank');
  411. if($buildInfo->scmPath) echo $lang->release->scmPath . html::a($buildInfo->scmPath, $buildInfo->scmPath, '_blank');
  412. }
  413. ?>
  414. </div>
  415. </div>
  416. <?php include '../../common/view/action.html.php';?>
  417. </div>
  418. </div>
  419. </div>
  420. </div>
  421. </div>
  422. </div>
  423. </div>
  424. <style>
  425. .tabs .tab-content .tab-pane .action{position: absolute; right: <?php echo ($summary or $countBugs or $countLeftBugs) ? '100px' : '-1px'?>; top: 0px;}
  426. </style>
  427. <?php js::set('param', helper::safe64Decode($param))?>
  428. <?php js::set('link', $link)?>
  429. <?php js::set('releaseID', $release->id)?>
  430. <?php js::set('type', $type)?>
  431. <?php include '../../common/view/footer.html.php';?>