Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
+57
-57
@@ -15,7 +15,7 @@ class product extends control
|
||||
|
||||
/**
|
||||
* Construct function.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -39,11 +39,11 @@ class product extends control
|
||||
* Index page, to browse.
|
||||
*
|
||||
* @param string $locate locate to browse page or not. If not, display all products.
|
||||
* @param int $productID
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @param int $productID
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -63,10 +63,10 @@ class product extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* project
|
||||
*
|
||||
* @param string $status
|
||||
* @param int $productID
|
||||
* project
|
||||
*
|
||||
* @param string $status
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -195,8 +195,8 @@ class product extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a product.
|
||||
*
|
||||
* Create a product.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -231,8 +231,8 @@ class product extends control
|
||||
|
||||
/**
|
||||
* Edit a product.
|
||||
*
|
||||
* @param int $productID
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -240,7 +240,7 @@ class product extends control
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->product->update($productID);
|
||||
$changes = $this->product->update($productID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if($action == 'undelete')
|
||||
{
|
||||
@@ -277,8 +277,8 @@ class product extends control
|
||||
|
||||
/**
|
||||
* Batch edit products.
|
||||
*
|
||||
* @param int $productID
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -333,8 +333,8 @@ class product extends control
|
||||
|
||||
/**
|
||||
* Close product.
|
||||
*
|
||||
* @param int $productID
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -368,8 +368,8 @@ class product extends control
|
||||
|
||||
/**
|
||||
* View a product.
|
||||
*
|
||||
* @param int $productID
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -403,8 +403,8 @@ class product extends control
|
||||
|
||||
/**
|
||||
* Delete a product.
|
||||
*
|
||||
* @param int $productID
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $confirm yes|no
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -425,9 +425,9 @@ class product extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Road map of a product.
|
||||
*
|
||||
* @param int $productID
|
||||
* Road map of a product.
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -451,12 +451,12 @@ class product extends control
|
||||
|
||||
/**
|
||||
* Product dynamic.
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -511,9 +511,9 @@ class product extends control
|
||||
|
||||
/**
|
||||
* AJAX: get projects of a product in html select.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $projectID
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $projectID
|
||||
* @param string $number
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -529,7 +529,7 @@ class product extends control
|
||||
$projects = $this->product->getProjectPairs($productID, $branch ? "0,$branch" : $branch, $params = 'nodeleted');
|
||||
}
|
||||
if($this->app->getViewType() == 'json') die(json_encode($projects));
|
||||
|
||||
|
||||
if($number === '')
|
||||
{
|
||||
die(html::select('project', $projects, $projectID, 'class=form-control onchange=loadProjectRelated(this.value)'));
|
||||
@@ -543,10 +543,10 @@ class product extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get plans of a product in html select.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $planID
|
||||
* AJAX: get plans of a product in html select.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $planID
|
||||
* @param bool $needCreate
|
||||
* @param string $expired
|
||||
* @access public
|
||||
@@ -557,7 +557,7 @@ class product extends control
|
||||
$plans = $this->loadModel('productplan')->getPairs($productID, $branch, $expired);
|
||||
$field = $fieldID ? "plans[$fieldID]" : 'plan';
|
||||
$output = html::select($field, $plans, $planID, "class='form-control chosen'");
|
||||
if(count($plans) == 1 and $needCreate)
|
||||
if(count($plans) == 1 and $needCreate)
|
||||
{
|
||||
$output .= "<span class='input-group-addon'>";
|
||||
$output .= html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch"), $this->lang->productplan->create, '_blank');
|
||||
@@ -570,11 +570,11 @@ class product extends control
|
||||
|
||||
/**
|
||||
* Drop menu page.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param string $extra
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param string $extra
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -598,9 +598,9 @@ class product extends control
|
||||
$productList = array();
|
||||
foreach($lines as $id => $name)
|
||||
{
|
||||
foreach($products as $key => $product)
|
||||
foreach($products as $key => $product)
|
||||
{
|
||||
if($product->line == $id)
|
||||
if($product->line == $id)
|
||||
{
|
||||
$product->name = $name . '/' . $product->name;
|
||||
$productList[] = $product;
|
||||
@@ -616,7 +616,7 @@ class product extends control
|
||||
|
||||
/**
|
||||
* Update order.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -637,8 +637,8 @@ class product extends control
|
||||
|
||||
/**
|
||||
* Show error no product when visit qa.
|
||||
*
|
||||
* @param string $fromModule
|
||||
*
|
||||
* @param string $fromModule
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -691,10 +691,10 @@ class product extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Export product.
|
||||
*
|
||||
* @param string $status
|
||||
* @param string $orderBy
|
||||
* Export product.
|
||||
*
|
||||
* @param string $status
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -755,8 +755,8 @@ class product extends control
|
||||
|
||||
/**
|
||||
* Build of product.
|
||||
*
|
||||
* @param int $productID
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -629,7 +629,7 @@ class productModel extends model
|
||||
$lastRoadmap['total'] = 0;
|
||||
foreach($lastKeys as $key)
|
||||
{
|
||||
if($key == '2030')
|
||||
if($key == '2030')
|
||||
{
|
||||
$lastRoadmap[$this->lang->productplan->future] = $groupRoadmap[$key];
|
||||
}
|
||||
@@ -832,7 +832,7 @@ class productModel extends model
|
||||
|
||||
/**
|
||||
* Get priv products.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-export muted"></i> <span class="text"><?php echo $lang->export ?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
<?php
|
||||
$misc = common::hasPriv('story', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy") : '#';
|
||||
echo "<li>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
@@ -154,7 +154,7 @@
|
||||
<?php echo html::commonButton($lang->edit, "data-form-action='$actionLink' $disabled");?>
|
||||
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<?php
|
||||
<?php
|
||||
$class = "class='disabled'";
|
||||
$canBatchClose = common::hasPriv('story', 'batchClose') && strtolower($browseType) != 'closedbyme' && strtolower($browseType) != 'closedstory';
|
||||
$actionLink = $this->createLink('story', 'batchClose', "productID=$productID&projectID=0");
|
||||
|
||||
@@ -2309,4 +2309,88 @@ class project extends control
|
||||
}
|
||||
die(js::locate(helper::createLink('project', 'story', 'projectID=' . $projectID), 'parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Story info for tree list.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param int $version
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function treeStory($storyID, $version = 0)
|
||||
{
|
||||
$this->loadModel('story');
|
||||
$story = $this->story->getById($storyID, $version, true);
|
||||
|
||||
$story->files = $this->loadModel('file')->getByObject('story', $storyID);
|
||||
$product = $this->dao->findById($story->product)->from(TABLE_PRODUCT)->fields('name, id, type')->fetch();
|
||||
$plan = $this->dao->findById($story->plan)->from(TABLE_PRODUCTPLAN)->fetch('title');
|
||||
$bugs = $this->dao->select('id,title')->from(TABLE_BUG)->where('story')->eq($storyID)->andWhere('deleted')->eq(0)->fetchAll();
|
||||
$fromBug = $this->dao->select('id,title')->from(TABLE_BUG)->where('toStory')->eq($storyID)->fetch();
|
||||
$cases = $this->dao->select('id,title')->from(TABLE_CASE)->where('story')->eq($storyID)->andWhere('deleted')->eq(0)->fetchAll();
|
||||
$modulePath = $this->loadModel('tree')->getParents($story->module);
|
||||
$users = $this->loadModel('user')->getPairs('noletter');
|
||||
|
||||
$this->view->product = $product;
|
||||
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($product->id);
|
||||
$this->view->plan = $plan;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->fromBug = $fromBug;
|
||||
$this->view->cases = $cases;
|
||||
$this->view->story = $story;
|
||||
$this->view->users = $users;
|
||||
$this->view->projects = $this->loadModel('project')->getPairs('nocode');
|
||||
$this->view->actions = $this->loadModel('action')->getList('story', $storyID);
|
||||
$this->view->modulePath = $modulePath;
|
||||
$this->view->version = $version == 0 ? $story->version : $version;
|
||||
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('story', $storyID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Task info for tree list.
|
||||
*
|
||||
* @param int $taskID
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function treeTask($taskID)
|
||||
{
|
||||
$this->loadModel('task');
|
||||
$task = $this->task->getById($taskID, true);
|
||||
if($task->fromBug != 0)
|
||||
{
|
||||
$bug = $this->loadModel('bug')->getById($task->fromBug);
|
||||
$task->bugSteps = '';
|
||||
if($bug)
|
||||
{
|
||||
$task->bugSteps = $this->loadModel('file')->setImgSize($bug->steps);
|
||||
foreach($bug->files as $file) $task->files[] = $file;
|
||||
}
|
||||
$this->view->fromBug = $bug;
|
||||
}
|
||||
else
|
||||
{
|
||||
$story = $this->loadModel('story')->getById($task->story);
|
||||
$task->storySpec = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->spec);
|
||||
$task->storyVerify = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->verify);
|
||||
$task->storyFiles = $this->loadModel('file')->getByObject('story', $task->story);
|
||||
}
|
||||
|
||||
if($task->team) $this->lang->task->assign = $this->lang->task->transfer;
|
||||
|
||||
/* Update action. */
|
||||
if($task->assignedTo == $this->app->user->account) $this->loadModel('action')->read('task', $taskID);
|
||||
|
||||
$project = $this->project->getById($task->project);
|
||||
|
||||
$this->view->task = $task;
|
||||
$this->view->project = $project;
|
||||
$this->view->actions = $this->loadModel('action')->getList('task', $taskID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2761,7 +2761,7 @@ class projectModel extends model
|
||||
$html .= '<a class="tree-toggle"><span class="label label-type">' . (empty($tree->parent) ? $this->lang->tree->module : $this->lang->tree->child) . '</span><span class="title">' . $tree->name . '</span></a>';
|
||||
break;
|
||||
case 'task':
|
||||
$link = helper::createLink('task', 'view', "taskID={$tree->id}");
|
||||
$link = helper::createLink('project', 'treeTask', "taskID={$tree->id}");
|
||||
$html .= '<li class="item-task">';
|
||||
$html .= '<a class="tree-link" href="' . $link . '"><span class="label label-id">' . $tree->id . '</span><span class="label label-type">' . (empty($tree->parent) ? $this->lang->task->common : $this->lang->task->children) . '</span><span class="title">' . $tree->title . '</span> <span class="user"><i class="icon icon-person"></i> ' . (empty($tree->assignedTo) ? $tree->openedBy : $tree->assignedTo) . '</span></a>';
|
||||
break;
|
||||
@@ -2772,7 +2772,7 @@ class projectModel extends model
|
||||
break;
|
||||
case 'story':
|
||||
$this->app->loadLang('story');
|
||||
$link = helper::createLink('story', 'view', "storyID={$tree->storyId}");
|
||||
$link = helper::createLink('project', 'treeStory', "storyID={$tree->storyId}");
|
||||
$html .= '<li class="item-story">';
|
||||
$html .= '<a class="tree-link" href="' . $link . '"><span class="label label-id">' . $tree->storyId . '</span><span class="label label-type">' . $this->lang->story->common . '</span><span class="title">' . $tree->title . '</span> <span class="user"><i class="icon icon-person"></i> ' . (empty($tree->assignedTo) ? $tree->openedBy : $tree->assignedTo) . '</span></a>';
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,288 @@
|
||||
<div class="detail">
|
||||
<h2 class="detail-title"><span class="label-id"><?php echo $story->id?></span> <span class="label label-story"><?php echo $lang->story->common?></span> <span class="title"><?php echo $story->title;?></span></h2>
|
||||
<div class="detail-content article-content">
|
||||
<div class="infos">
|
||||
<span class="status-draft"><span class="label label-dot"></span> <?php echo $lang->story->statusList[$story->status];?></span>
|
||||
<span><?php echo $lang->story->stage;?>: <?php echo $lang->story->stageList[$story->stage];?></span>
|
||||
<span><?php echo $lang->story->estimate;?>: <?php echo $story->estimate;?></span>
|
||||
</div>
|
||||
<div class="btn-toolbar">
|
||||
<?php
|
||||
$vars = "story={$story->id}";
|
||||
common::printIcon('story', 'change', $vars, $story, 'list', 'fork', '', 'btn btn-info btn-icon');
|
||||
common::printIcon('story', 'delete', $vars, $story, 'list', 'trash', 'hiddenwin', 'btn btn-info btn-icon');
|
||||
common::printIcon('story', 'review', $vars, $story, 'list', 'glasses', '', 'btn btn-info btn-icon');
|
||||
common::printIcon('story', 'close', $vars, $story, 'list', 'off', '', 'btn btn-info btn-icon iframe', true);
|
||||
common::printIcon('story', 'edit', $vars, $story, 'list', '', '', 'btn btn-info btn-icon');
|
||||
if($this->config->global->flow != 'onlyStory') common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', 'btn btn-info btn-icon');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="detail-title"><?php echo $lang->story->legendSpec;?></div>
|
||||
<div class="detail-content article-content"><?php echo $story->spec;?></div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="detail-title"><?php echo $lang->story->legendVerify;?></div>
|
||||
<div class="detail-content article-content"><?php echo $story->verify;?></div>
|
||||
</div>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true'));?>
|
||||
|
||||
<details class="detail" open>
|
||||
<summary class="detail-title"><?php echo $lang->story->legendBasicInfo;?></summary>
|
||||
<div class="detail-content">
|
||||
<table class="table table-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->product;?></th>
|
||||
<td><?php echo html::a($this->createLink('product', 'view', "productID=$story->product"), $product->name);?></td>
|
||||
</tr>
|
||||
<?php if($product->type != 'normal'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->branch;?></th>
|
||||
<td><?php common::printLink('product', 'browse', "productID=$story->product&branch=$story->branch", $branches[$story->branch]);?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->module;?></th>
|
||||
<?php
|
||||
$moduleTitle = '';
|
||||
ob_start();
|
||||
if(empty($modulePath))
|
||||
{
|
||||
$moduleTitle .= '/';
|
||||
echo "/";
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
$moduleTitle .= $module->name;
|
||||
if(!common::printLink('product', 'browse', "productID=$story->product&branch=$story->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();
|
||||
?>
|
||||
<td title='<?php echo $moduleTitle?>'><?php echo $printModule?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->plan;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(isset($story->planTitle))
|
||||
{
|
||||
foreach($story->planTitle as $planID => $planTitle)
|
||||
{
|
||||
if(!common::printLink('productplan', 'view', "planID=$planID", $planTitle)) echo $lanTitle;
|
||||
echo '<br />';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->source;?></th>
|
||||
<td id='source'><?php echo $lang->story->sourceList[$story->source];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->sourceNote;?></th>
|
||||
<td><?php echo $story->sourceNote;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->status;?></th>
|
||||
<td><span class='status-<?php echo $story->status?>'><span class="label label-dot"></span> <?php echo $lang->story->statusList[$story->status];?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->stage;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if($story->stages and $branches)
|
||||
{
|
||||
foreach($story->stages as $branch => $stage) if(isset($branches[$branch])) echo $branches[$branch] . ' : ' . $lang->story->stageList[$stage] . '<br />';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $lang->story->stageList[$story->stage];
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->pri;?></th>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>'><?php echo zget($lang->story->priList, $story->pri)?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->estimate;?></th>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->keywords;?></th>
|
||||
<td><?php echo $story->keywords;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->legendMailto;?></th>
|
||||
<td><?php $mailto = explode(',', $story->mailto); foreach($mailto as $account) {if(empty($account)) continue; echo "<span>" . $users[trim($account)] . '</span> '; }?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details class="detail" open>
|
||||
<summary class="detail-title"><?php echo $lang->story->legendProjectAndTask;?></summary>
|
||||
<div class="detail-content">
|
||||
<ul class="list-unstyled">
|
||||
<?php
|
||||
foreach($story->tasks as $projectTasks)
|
||||
{
|
||||
foreach($projectTasks as $task)
|
||||
{
|
||||
if(!isset($projects[$task->project])) continue;
|
||||
$projectName = $projects[$task->project];
|
||||
echo "<li title='$task->name'>" . html::a($this->createLink('task', 'view', "taskID=$task->id", '', true), "#$task->id $task->name", '', "class='iframe' data-width='80%'");
|
||||
echo html::a($this->createLink('project', 'browse', "projectID=$task->project"), $projectName, '', "class='text-muted'") . '</li>';
|
||||
}
|
||||
}
|
||||
if(count($story->tasks) == 0)
|
||||
{
|
||||
foreach($story->projects as $projectID => $project)
|
||||
{
|
||||
echo "<li title='$project->name'>" . html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name, '', "class='text-muted'") . '</li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details class="detail" open>
|
||||
<summary class="detail-title"><?php echo $lang->story->legendRelated;?></summary>
|
||||
<div class="detail-content">
|
||||
<table class="table table-data">
|
||||
<tbody>
|
||||
<?php if($config->global->flow != 'onlyStory'):?>
|
||||
<?php if(!empty($fromBug)):?>
|
||||
<tr class='text-top'>
|
||||
<th class='w-70px'><?php echo $lang->story->legendFromBug;?></th>
|
||||
<td class='pd-0'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php echo "<li title='#$fromBug->id $fromBug->title'>" . html::a($this->createLink('bug', 'view', "bugID=$fromBug->id"), "#$fromBug->id $fromBug->title") . '</li>';?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class='text-top'>
|
||||
<th class='w-70px'><?php echo $lang->story->legendBugs;?></th>
|
||||
<td class='pd-0'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
echo "<li title='#$bug->id $bug->title'>" . html::a($this->createLink('bug', 'view', "bugID=$bug->id"), "#$bug->id $bug->title") . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='text-top'>
|
||||
<th><?php echo $lang->story->legendCases;?></th>
|
||||
<td class='pd-0'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
foreach($cases as $case)
|
||||
{
|
||||
echo "<li title='#$case->id $case->title'>" . html::a($this->createLink('testcase', 'view', "caseID=$case->id"), "#$case->id $case->title") . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class='text-top'>
|
||||
<th class='w-80px'><?php echo $lang->story->legendLinkStories;?></th>
|
||||
<td class='pd-0'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
$linkStories = explode(',', $story->linkStories) ;
|
||||
foreach($linkStories as $linkStoryID)
|
||||
{
|
||||
if(isset($story->extraStories[$linkStoryID])) echo '<li>' . html::a(inlink('view', "storyID=$linkStoryID"), "#$linkStoryID " . $story->extraStories[$linkStoryID]) . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='text-top'>
|
||||
<th><?php echo $lang->story->legendChildStories;?></th>
|
||||
<td class='pd-0'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
$childStories = explode(',', $story->childStories) ;
|
||||
foreach($childStories as $childStoryID)
|
||||
{
|
||||
if(isset($story->extraStories[$childStoryID])) echo '<li>' . html::a(inlink('view', "storyID=$childStoryID"), "#$childStoryID " . $story->extraStories[$childStoryID]) . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details class="detail" open>
|
||||
<summary class="detail-title"><?php echo $lang->story->legendLifeTime;?></summary>
|
||||
<div class="detail-content">
|
||||
<table class="table table-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-70px'><?php echo $lang->story->openedBy;?></th>
|
||||
<td><?php echo $users[$story->openedBy] . $lang->at . $story->openedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->assignedTo;?></th>
|
||||
<td><?php if($story->assignedTo) echo $users[$story->assignedTo] . $lang->at . $story->assignedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->reviewedBy;?></th>
|
||||
<td><?php $reviewedBy = explode(',', $story->reviewedBy); foreach($reviewedBy as $account) echo ' ' . $users[trim($account)]; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->reviewedDate;?></th>
|
||||
<td><?php if($story->reviewedBy) echo $story->reviewedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->closedBy;?></th>
|
||||
<td><?php if($story->closedBy) echo $users[$story->closedBy] . $lang->at . $story->closedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->closedReason;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if($story->closedReason) echo $lang->story->reasonList[$story->closedReason];
|
||||
if(isset($story->extraStories[$story->duplicateStory]))
|
||||
{
|
||||
echo html::a(inlink('view', "storyID=$story->duplicateStory"), '#' . $story->duplicateStory . ' ' . $story->extraStories[$story->duplicateStory]);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->lastEditedBy;?></th>
|
||||
<td><?php if($story->lastEditedBy) echo $users[$story->lastEditedBy] . $lang->at . $story->lastEditedDate;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=story&objectID=$story->id");?>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
@@ -0,0 +1,82 @@
|
||||
<div class="detail">
|
||||
<h2 class="detail-title">
|
||||
<span class="label-id"><?php echo $task->id?></span>
|
||||
<span class="label label-task"><?php echo $lang->task->common?></span>
|
||||
<span class="title">
|
||||
<?php if(!empty($task->parent)) echo '<span class="label no-margin">' . $this->lang->task->childrenAB . '</span>';?>
|
||||
<?php if(!empty($task->team)) echo '<span class="label no-margin">' . $this->lang->task->multipleAB . '</span>';?>
|
||||
<?php echo isset($task->parentName) ? $task->parentName . '/' : '';?><?php echo $task->name;?>
|
||||
</span>
|
||||
</h2>
|
||||
<div class="detail-content article-content">
|
||||
<div class="infos">
|
||||
<span class="status-wait"><span class="label label-dot"></span> <?php echo zget($lang->task->statusList, $task->status);?></span>
|
||||
<span><?php echo $lang->task->estimate;?> <?php echo $task->estimate . $lang->workingHour;?></span>
|
||||
<span><?php echo $lang->task->consumed;?> <?php echo round($task->consumed, 2) . $lang->workingHour;?></span>
|
||||
<span><?php echo $lang->task->left;?> <?php echo $task->left . $lang->workingHour;?></span>
|
||||
</div>
|
||||
<div class="infos">
|
||||
<span><?php echo $lang->task->type;?>: <?php echo $lang->task->typeList[$task->type];?></span>
|
||||
<span><?php echo $lang->task->deadline;?>: <?php echo $task->deadline; if(isset($task->delay)) printf($lang->task->delayWarning, $task->delay);?></span>
|
||||
</div>
|
||||
<div class="btn-toolbar">
|
||||
<?php
|
||||
if($task->status == 'wait') common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'btn btn-info btn-icon iframe', true);
|
||||
if($task->status == 'wait') common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'btn btn-info btn-icon iframe', true);
|
||||
if($task->status == 'pause') common::printIcon('task', 'restart', "taskID=$task->id", $task, 'list', '', '', 'btn btn-info btn-icon iframe', true);
|
||||
if($task->status == 'done' or $task->status == 'cancel' or $task->status == 'closed') common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'btn btn-info btn-icon iframe', true);
|
||||
if($task->status == 'doing') common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'btn btn-info btn-icon iframe', true);
|
||||
|
||||
common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', 'time', '', 'btn btn-info btn-icon iframe', true);
|
||||
common::printIcon('task', 'edit', "taskID=$task->id", $task, 'list', '', '', 'btn btn-info btn-icon');
|
||||
if(empty($task->team) or empty($task->children))
|
||||
{
|
||||
common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id&ifame=0", $task, 'list', 'plus', '', 'btn btn-info btn-icon', '', '', $lang->task->children);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail" open>
|
||||
<div class="detail-title"><?php echo $lang->task->legendDesc;?></div>
|
||||
<div class="detail-content article-content">
|
||||
<?php echo !empty($task->desc) ? $task->desc : "<div class='text-center text-muted'>" . $lang->task->noData . '</div>';?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($project->type != 'ops'):?>
|
||||
<?php if($task->fromBug != 0):?>
|
||||
<div class="detail" open>
|
||||
<div class="detail-title"><?php echo $lang->bug->steps;?></div>
|
||||
<div class="detail-content article-content">
|
||||
<?php echo !empty($task->bugSteps) ? $task->bugSteps : "<div class='text-center text-muted'>" . $lang->task->noData . '</div>';?>
|
||||
</div>
|
||||
</div>
|
||||
<?php elseif($task->story):?>
|
||||
<div class="detail" open>
|
||||
<div class='detail-title'><?php echo $lang->task->storySpec;?></div>
|
||||
<div class='detail-content article-content'>
|
||||
<?php echo (!empty($task->storySpec) || !empty($task->storyFiles)) ? $task->storySpec : "<div class='text-center text-muted'>" . $lang->task->noData . '</div>';?>
|
||||
</div>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->storyFiles, 'fieldset' => 'false'));?>
|
||||
</div>
|
||||
<div class='detail' open>
|
||||
<div class='detail-title'><?php echo $lang->task->storyVerify;?></div>
|
||||
<div class='detail-content article-content'>
|
||||
<?php echo !empty($task->storyVerify) ? $task->storyVerify : "<div class='text-center text-muted'>" . $lang->task->noData . '</div>';?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if(isset($task->cases) and $task->cases):?>
|
||||
<div class='detail' open>
|
||||
<div class='detail-title'><?php echo $lang->task->case;?></div>
|
||||
<div class='detail-content article-content'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php foreach($task->cases as $caseID => $case) echo '<li>' . html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', true), "#$caseID " . $case, '', "data-toggle='modal' data-type='iframe' data-width='90%'") . '</li>';?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true'));?>
|
||||
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=task&objectID=$task->id");?>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
@@ -160,7 +160,7 @@ $lang->task->confirmDeleteEstimate = "Do you want to delete it?";
|
||||
$lang->task->copyStoryTitle = "Copy Story";
|
||||
$lang->task->afterSubmit = "After Created,";
|
||||
$lang->task->successSaved = "Created!";
|
||||
$lang->task->delayWarning = " <strong class='delayed f-14px'> Delay %s days </strong>";
|
||||
$lang->task->delayWarning = " <strong class='text-danger'> Delay %s days </strong>";
|
||||
$lang->task->remindBug = "This Task is converted from a Bug. Do you want to update te Bug:%s?";
|
||||
$lang->task->confirmChangeProject = "If you change {$lang->projectCommon}, the related Module, Story and Assignor will be changed. Do you want to do it?";
|
||||
$lang->task->confirmFinish = '"Left Hour" is 0. Do you want to change the Status to "Done"?';
|
||||
|
||||
@@ -162,7 +162,7 @@ $lang->task->confirmDeleteEstimate = "您确定要删除这个记录吗?";
|
||||
$lang->task->copyStoryTitle = "同需求";
|
||||
$lang->task->afterSubmit = "添加之后";
|
||||
$lang->task->successSaved = "成功添加,";
|
||||
$lang->task->delayWarning = " <strong class='delayed f-14px'> 延期%s天 </strong>";
|
||||
$lang->task->delayWarning = " <strong class='text-danger'> 延期%s天 </strong>";
|
||||
$lang->task->remindBug = "该任务为Bug转化得到,是否更新Bug:%s ?";
|
||||
$lang->task->confirmChangeProject = "修改{$lang->projectCommon}会导致相应的所属模块、相关需求和指派人发生变化,确定吗?";
|
||||
$lang->task->confirmFinish = '"预计剩余"为0,确认将任务状态改为"已完成"吗?';
|
||||
|
||||
Reference in New Issue
Block a user