diff --git a/module/bug/js/x.edit.js b/module/bug/js/x.edit.js
new file mode 100644
index 0000000000..b31f81c6ec
--- /dev/null
+++ b/module/bug/js/x.edit.js
@@ -0,0 +1,5 @@
+$(function()
+{
+ var $btn = $('.col-8').find('.form-actions').clone();
+ $('.col-4').find('.detail:last-child').html($btn);
+})
diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php
new file mode 100644
index 0000000000..dad15f2641
--- /dev/null
+++ b/module/bug/view/view.html.php
@@ -0,0 +1,389 @@
+
+ * @package bug
+ * @version $Id: view.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
+ * @link http://www.zentao.net
+ */
+?>
+
+
+session->bugList != false ? $app->session->bugList : inlink('browse', "productID=$bug->product");
+$confirmLink = 'xxc:openUrlInDialog/' . rawurlencode(common::getSysUrl() . helper::createLink('bug', 'confirmBug', "bugID=$bug->id"));
+$assignLink = 'xxc:openUrlInDialog/' . rawurlencode(common::getSysUrl() . helper::createLink('bug', 'assignTo', "bugID=$bug->id"));
+$resolveLink = 'xxc:openUrlInDialog/' . rawurlencode(common::getSysUrl() . helper::createLink('bug', 'resolve', "bugID=$bug->id"));
+$editLink = 'xxc:openUrlInDialog/' . rawurlencode(common::getSysUrl() . helper::createLink('bug', 'edit', "bugID=$bug->id"));
+?>
+
+
+
+
+ product}&branch={$bug->branch}&extra=moduleID={$bug->module}", "" . $lang->bug->create, '', "class='btn btn-primary'"); ?>
+
+
+
+
+
+
+
+
bug->legendSteps;?>
+
+ bug->tplStep));
+ $steps = str_replace('
' . $tplStep, '
' . $tplStep . '
', $bug->steps);
+
+ $tplResult = strip_tags(trim($lang->bug->tplResult));
+ $steps = str_replace('
' . $tplResult, '
' . $tplResult . '
', $steps);
+
+ $tplExpect = strip_tags(trim($lang->bug->tplExpect));
+ $steps = str_replace('
' . $tplExpect, '
' . $tplExpect . '
', $steps);
+
+ $steps = str_replace('
', '', $steps);
+ echo $steps;
+ ?>
+
+
+ fetch('file', 'printFiles', array('files' => $bug->files, 'fieldset' => 'true'));?>
+ createLink('action', 'comment', "objectType=bug&objectID=$bug->id");?>
+
+
+ id";
+ $copyParams = "productID=$productID&branch=$bug->branch&extras=bugID=$bug->id";
+ $convertParams = "productID=$productID&branch=$bug->branch&moduleID=0&from=bug&bugID=$bug->id";
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+ | bug->product;?> |
+ product", $productName)) echo $productName;?> |
+
+ session->currentProductType != 'normal'):?>
+
+ | product->branch;?> |
+ product&branch=$bug->branch", $branchName)) echo $branchName;?> |
+
+
+
+ | bug->module;?> |
+ $module)
+ {
+ $moduleTitle .= $module->name;
+ if(!common::printLink('bug', 'browse', "productID=$bug->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
+ if(isset($modulePath[$key + 1]))
+ {
+ $moduleTitle .= '/';
+ echo $lang->arrow;
+ }
+ }
+ }
+ $printModule = ob_get_contents();
+ ob_end_clean();
+ ?>
+ |
+
+
+ | bug->productplan;?> |
+ plan or !common::printLink('productplan', 'view', "planID=$bug->plan&type=bug", $bug->planName)) echo $bug->planName;?> |
+
+
+ | bug->type;?> |
+ bug->typeList[$bug->type])) echo $lang->bug->typeList[$bug->type]; else echo $bug->type;?> |
+
+
+ bug->severityList as $severityKey => $severityValue)
+ {
+ if(!empty($severityKey) and (string)$severityKey != (string)$severityValue)
+ {
+ $hasCustomSeverity = true;
+ break;
+ }
+ }
+ ?>
+ | bug->severity;?> |
+
+
+ bug->severityList, $bug->severity, $bug->severity);?>
+
+
+
+ |
+
+
+ | bug->pri;?> |
+ pri;?>' title='bug->priList, $bug->pri);?>'>bug->priList, $bug->pri)?> |
+
+
+ | bug->status;?> |
+ bug->statusList[$bug->status];?> |
+
+
+ | bug->activatedCount;?> |
+ activatedCount;?> |
+
+
+ | bug->activatedDate;?> |
+ activatedDate;?> |
+
+
+ | bug->confirmed;?> |
+ bug->confirmedList[$bug->confirmed];?> |
+
+
+ | bug->lblAssignedTo;?> |
+ assignedTo) echo $users[$bug->assignedTo] . $lang->at . $bug->assignedDate;?> |
+
+
+ | bug->deadline;?> |
+ deadline) echo $bug->deadline;?> |
+
+
+ | bug->os;?> |
+ bug->osList[$bug->os];?> |
+
+
+ | bug->browser;?> |
+ bug->browserList[$bug->browser];?> |
+
+
+ | bug->keywords;?> |
+ keywords;?> |
+
+
+ | bug->mailto;?> |
+ mailto)); foreach($mailto as $account) echo ' ' . $users[$account]; ?> |
+
+
+
+
+ global->flow != 'onlyTest'):?>
+
+
+
+
+ | bug->project;?> |
+ project) echo html::a($this->createLink('project', 'browse', "projectid=$bug->project"), $bug->projectName);?> |
+
+
+ | bug->story;?> |
+
+ story) echo html::a($this->createLink('story', 'view', "storyID=$bug->story", '', true), "#$bug->story $bug->storyTitle", '', "class='iframe' data-width='80%'");
+ if($bug->storyStatus == 'active' and $bug->latestStoryVersion > $bug->storyVersion)
+ {
+ echo "({$lang->story->changed} ";
+ echo html::a($this->createLink('bug', 'confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin');
+ echo ")";
+ }
+ ?>
+ |
+
+
+ | bug->task;?> |
+ task) echo html::a($this->createLink('task', 'view', "taskID=$bug->task", '', true), $bug->taskName, '', "class='iframe' data-width='80%'");?> |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | bug->openedBy;?> |
+ openedBy) . $lang->at . $bug->openedDate;?> |
+
+
+ | bug->openedBuild;?> |
+
+ openedBuild)
+ {
+ $openedBuilds = explode(',', $bug->openedBuild);
+ foreach($openedBuilds as $openedBuild) isset($builds[$openedBuild]) ? print($builds[$openedBuild] . ' ') : print($openedBuild . ' ');
+ }
+ else
+ {
+ echo $bug->openedBuild;
+ }
+ ?>
+ |
+
+
+ | bug->lblResolved;?> |
+ resolvedBy) echo zget($users, $bug->resolvedBy) . $lang->at . $bug->resolvedDate;?> |
+
+
+ | bug->resolvedBuild;?> |
+ resolvedBuild])) echo $builds[$bug->resolvedBuild]; else echo $bug->resolvedBuild;?> |
+
+
+ | bug->resolution;?> |
+
+ bug->resolutionList[$bug->resolution]) ? $lang->bug->resolutionList[$bug->resolution] : $bug->resolution;
+ if(isset($bug->duplicateBugTitle)) echo " #$bug->duplicateBug:" . html::a($this->createLink('bug', 'view', "bugID=$bug->duplicateBug", '', true), $bug->duplicateBugTitle, '', "class='iframe' data-width='80%'");
+ ?>
+ |
+
+
+ | bug->closedBy;?> |
+ closedBy) echo zget($users, $bug->closedBy) . $lang->at . $bug->closedDate;?> |
+
+
+ | bug->lblLastEdited;?> |
+ lastEditedBy) echo zget($users, $bug->lastEditedBy, $bug->lastEditedBy) . $lang->at . $bug->lastEditedDate?> |
+
+
+
+
+
+
+
+
+ | bug->linkBug;?> |
+
+ linkBugTitles))
+ {
+ foreach($bug->linkBugTitles as $linkBugID => $linkBugTitle)
+ {
+ echo html::a($this->createLink('bug', 'view', "bugID=$linkBugID", '', true), "#$linkBugID $linkBugTitle", '', "class='iframe' data-width='80%'") . ' ';
+ }
+ }
+ ?>
+ |
+
+ case):?>
+
+ | bug->fromCase;?> |
+ createLink('testcase', 'view', "caseID=$bug->case", '', true), "#$bug->case $bug->caseTitle", '', "class='iframe' data-width='80%'");?> |
+
+
+ toCases):?>
+
+ | bug->toCase;?> |
+
+ toCases as $caseID => $case)
+ {
+ echo ' ' . html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', true), $case, '', "class='iframe' data-width='80%'") . ' ';
+ }
+ ?>
+ |
+
+
+ global->flow != 'onlyTest'):?>
+ toStory != 0):?>
+
+ | bug->toStory;?> |
+ createLink('story', 'view', "storyID=$bug->toStory", '', true), "#$bug->toStory $bug->toStoryTitle", '', "class='iframe' data-width='80%'");?> |
+
+
+ toTask != 0):?>
+
+ | bug->toTask;?> |
+ createLink('task', 'view', "taskID=$bug->toTask", '', true), "#$bug->toTask $bug->toTaskTitle", '', "class='iframe' data-width='80%'");?> |
+
+
+
+
+
+
+
+
+
+
+
+
+