Conflicts:
	module/doc/view/browse.html.php
This commit is contained in:
daitingting
2018-05-09 11:01:40 +08:00
47 changed files with 1163 additions and 700 deletions
-1
View File
@@ -1062,7 +1062,6 @@ EOT;
$jsConfig->runMode = $runMode;
$jsConfig->timeout = isset($config->timeout) ? $config->timeout : '';
$jsConfig->pingInterval = isset($config->pingInterval) ? $config->pingInterval : '';
$jsConfig->debug = $config->debug;
$jsLang = new stdclass();
$jsLang->submitting = isset($lang->loading) ? $lang->loading : '';
+1 -1
View File
@@ -12,7 +12,7 @@
.card a, .card:hover a {color: #444}
.card a:hover {color: #000;}
#notice {margin: -20px -20px 0}
#notice {margin: -20px -20px 20px}
#titlebar {margin-top: -20px; border-top: none}
#notice + #titlebar {margin-top: 0; border-top: 1px solid #e5e5e5}
#proversion, #zentaotrain{color:#D2322D}
+12 -12
View File
@@ -10,18 +10,18 @@
* @link http://www.zentao.net
*/
?>
<div class="panel-body has-table">
<table class='table table-borderless table-hover table-fixed-head block-products'>
<div class="panel-body has-table block-products">
<table class='table table-borderless table-hover table-fixed-head table-fixed'>
<thead>
<tr>
<th class='c-name'><?php echo $lang->product->name;?></th>
<th class='c-plans'><?php echo $lang->product->plans;?></th>
<th class='c-publishs'><?php echo $lang->product->releases;?></th>
<th class='c-num'><?php echo $lang->product->plans;?></th>
<th class='c-num'><?php echo $lang->product->releases;?></th>
<?php if($longBlock):?>
<th class='c-project'><?php echo $lang->product->currentProject;?></th>
<th class='c-name'><?php echo $lang->product->currentProject;?></th>
<?php endif;?>
<th class='c-stories'><?php echo $lang->story->statusList['active'] . $lang->story->common;?></th>
<th class='c-bugs'><?php echo $lang->bug->unResolved . $lang->bug->common;?></th>
<th class='c-num'><?php echo $lang->story->statusList['active'] . $lang->story->common;?></th>
<th class='c-num'><?php echo $lang->bug->unResolved . $lang->bug->common;?></th>
</tr>
</thead>
<tbody>
@@ -32,13 +32,13 @@
?>
<tr data-url='<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink); ?>' <?php echo $appid?>>
<td class='c-name' title='<?php echo $product->name?>'><?php echo $product->name?></td>
<td class="c-plans"><?php echo $product->plans?></td>
<td class="c-publishs"><?php echo $product->releases?></td>
<td class="c-num"><?php echo $product->plans?></td>
<td class="c-num"><?php echo $product->releases?></td>
<?php if($longBlock):?>
<td class='c-project'><?php echo zget($projects, $product->id, '');?></td>
<td class='c-name'><?php echo zget($projects, $product->id, '');?></td>
<?php endif;?>
<td class="c-stories"><?php echo $product->stories['active']?></td>
<td class="c-bugs"><?php echo $product->unResolved?></td>
<td class="c-num"><?php echo $product->stories['active']?></td>
<td class="c-num"><?php echo $product->unResolved?></td>
</tr>
<?php endforeach;?>
</tbody>
+1 -1
View File
@@ -238,8 +238,8 @@ $lang->project->menu->view = array('link' => '概况|project|view|projectID=
$lang->project->subMenu = new stdclass();
$lang->project->subMenu->list = new stdclass();
$lang->project->subMenu->list->task = '任务列表|project|task|projectID=%s';
$lang->project->subMenu->list->tree = '树状图|project|tree|projectID=%s';
$lang->project->subMenu->list->groupTask = '分组视图|project|groupTask|projectID=%s';
$lang->project->subMenu->list->tree = '树状图|project|tree|projectID=%s';
$lang->project->subMenu->qa = new stdclass();
$lang->project->subMenu->qa->bug = 'Bug|project|bug|projectID=%s';
+1 -3
View File
@@ -4,7 +4,7 @@
<div id='divider'></div>
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' scrolling='no' class='debugwin hidden'></iframe>
<?php $onlybody = zget($_GET, 'onlybody', 'no');?>
<?php if($onlybody != 'yes'):?>
</main><?php /* end '#wrap' in 'header.html.php'. */ ?>
<footer id='footer'>
@@ -75,8 +75,6 @@ $(function(){ redirect('<?php echo $ranzhiURL?>', '<?php echo $this->config->sso
</script>
<?php endif;?>
<script>config.onlybody = '<?php echo $onlybody?>';</script>
<?php
if($this->loadModel('cron')->runable()) js::execute('startCron()');
if(isset($pageJS)) js::execute($pageJS); // load the js for current page.
+1 -1
View File
@@ -1,7 +1,7 @@
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' scrolling='no' class='debugwin hidden'></iframe>
<?php if($this->loadModel('cron')->runable()) js::execute('startCron()');?>
<script laguage='Javascript'>
<script>
<?php if(isset($pageJS)) echo $pageJS;?>
</script>
</body>
+2
View File
@@ -6,6 +6,7 @@ $themeRoot = $webRoot . "theme/";
$defaultTheme = $webRoot . 'theme/default/';
$langTheme = $themeRoot . 'lang/' . $app->getClientLang() . '.css';
$clientTheme = $this->app->getClientTheme();
$onlybody = zget($_GET, 'onlybody', 'no');
?>
<!DOCTYPE html>
<html lang='<?php echo $app->getClientLang();?>'>
@@ -17,6 +18,7 @@ $clientTheme = $this->app->getClientTheme();
<?php
echo html::title($title . ' - ' . $lang->zentaoPMS);
js::exportConfigVars();
echo '<script>config.onlybody = "' . $onlybody . '";</script>';
if($config->debug)
{
js::import($jsRoot . 'jquery/lib.js');
+5 -3
View File
@@ -12,7 +12,9 @@
?>
<?php include '../../common/view/header.html.php';?>
<div class="main-row split-row" id="mainRow">
<?php if($this->from == 'doc'):?>
<?php include './side.html.php';?>
<?php endif;?>
<div class="main-col" data-min-width="400">
<div class="panel block-files block-sm no-margin">
<div class="panel-heading">
@@ -42,9 +44,9 @@
</a>
<?php if($type == 'custom'):?>
<div class="actions">
<?php common::printLink('doc', 'collect', "objectID=$lib->id&objectType=lib", "<i class='icon icon-star-empty'></i>", '', "title='{$lang->doc->collect}' class='btn btn-link'")?>
<?php common::printLink('doc', 'editLib', "libID=$lib->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link' data-toggle='modal'")?>
<?php common::printLink('doc', 'deleteLib', "libID=$lib->id", "<i class='icon icon-trash'></i>", '', "title='{$lang->delete}' class='btn btn-link'")?>
<?php common::printLink('doc', 'collect', "objectID=$lib->id&objectType=lib", "<i class='icon icon-star-empty'></i>", 'hiddenwin', "title='{$lang->doc->collect}' class='btn btn-link'")?>
<?php common::printLink('doc', 'editLib', "libID=$lib->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
<?php common::printLink('doc', 'deleteLib', "libID=$lib->id", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
</div>
<?php endif;?>
</div>
+12 -2
View File
@@ -11,7 +11,12 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<<<<<<< HEAD
<script language='Javascript'>
=======
<?php include '../../common/view/datepicker.html.php';?>
<script>
>>>>>>> a4e6189f518dcb49e98ef2c70757ec0ed757aea0
var browseType = '<?php echo $browseType;?>';
</script>
<?php js::set('confirmDelete', $lang->doc->confirmDelete)?>
@@ -19,8 +24,13 @@ var browseType = '<?php echo $browseType;?>';
<?php if($this->from != 'doc') js::set('type', 'doc');?>
<div class='main-row split-row' id='mainRow'>
<?php if($this->from == 'doc'):?>
<?php include './side.html.php';?>
<<<<<<< HEAD
<div class="col-spliter"></div>
=======
<?php endif;?>
>>>>>>> a4e6189f518dcb49e98ef2c70757ec0ed757aea0
<?php if($this->cookie->browseType == 'bygrid'):?>
<?php include dirname(__FILE__) . '/browsebygrid.html.php';?>
<?php else:?>
@@ -76,8 +86,8 @@ var browseType = '<?php echo $browseType;?>';
<td class="c-name"><?php echo html::a(inlink('view', "docID=$doc->id"), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title);?></td>
<td class="c-actions">
<?php common::printLink('doc', 'collect', "objectID=$doc->id&objectType=doc", "<i class='icon {$star}'></i>", 'hiddenwin', "title='{$lang->doc->collect}' class='btn btn-link'")?>
<?php common::printLink('doc', 'edit', "docID=$doc->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link'")?>
<?php common::printLink('doc', 'delete', "docID=$doc->id", "<i class='icon icon-trash'></i>", '', "title='{$lang->delete}' class='btn btn-link'")?>
<?php common::printLink('doc', 'edit', "docID=$doc->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
<?php common::printLink('doc', 'delete', "docID=$doc->id", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
</td>
<td class="c-num"></td>
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
+4 -2
View File
@@ -12,7 +12,9 @@
?>
<?php include '../../common/view/header.html.php';?>
<div class="main-row split-row" id="mainRow">
<?php if($this->from == 'doc'):?>
<?php include './side.html.php';?>
<?php endif;?>
<div class="main-col" data-min-width="400">
<div class="panel block-files block-sm no-margin">
<div class="panel-heading">
@@ -68,8 +70,8 @@
<?php if($libID != 'project' and $libID != 'files'):?>
<div class="actions">
<?php common::printLink('doc', 'collect', "objectID=$libID&objectType=doclib", "<i class='icon icon-star-empty'></i>", 'hiddenwin', "title='{$lang->doc->collect}' class='btn btn-link'")?>
<?php common::printLink('doc', 'editLib', "libID=$libID", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link' data-toggle='modal'")?>
<?php common::printLink('doc', 'deleteLib', "libID=$libID", "<i class='icon icon-trash'></i>", '', "title='{$lang->delete}' class='btn btn-link'")?>
<?php common::printLink('doc', 'editLib', "libID=$libID", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
<?php common::printLink('doc', 'deleteLib', "libID=$libID", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
</div>
<?php endif;?>
</div>
-1
View File
@@ -1 +0,0 @@
.main-content .main-header .actions {position: absolute; top: 12px; right: 60px; float: right !important;}
+37 -35
View File
@@ -20,40 +20,42 @@
</div>
</div>
<div id="mainContent">
<table class="main-table table has-sort-head table-fixed">
<thead>
<tr>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th class='w-160px'><?php echo $lang->project->code;?></th>
<th class="text-left"><?php echo $lang->project->name;?></th>
<th class='w-date'><?php echo $lang->project->begin;?></th>
<th class='w-date'><?php echo $lang->project->end;?></th>
<th class='w-status'><?php echo $lang->statusAB;?></th>
<th class='w-user'><?php echo $lang->team->role;?></th>
<th class='w-date'><?php echo $lang->team->join;?></th>
<th class='w-110px'><?php echo $lang->team->hours;?></th>
</tr>
</thead>
<tbody>
<?php foreach($projects as $project):?>
<?php $projectLink = $this->createLink('project', 'browse', "projectID=$project->id");?>
<tr>
<td><?php echo html::a($projectLink, $project->id);?></td>
<td class='text-left'><?php echo $project->code;?></td>
<td class='text-left'><?php echo html::a($projectLink, $project->name);?></td>
<td><?php echo $project->begin;?></td>
<td><?php echo $project->end;?></td>
<?php if(isset($project->delay)):?>
<td class='project-delay'><?php echo $lang->project->delayed;?></td>
<?php else:?>
<td class='project-<?php echo $project->status?>'><?php echo $lang->project->statusList[$project->status];?></td>
<?php endif;?>
<td><?php echo $project->role;?></td>
<td><?php echo $project->join;?></td>
<td><?php echo $project->hours;?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<form class='main-table'>
<table class="table has-sort-head table-fixed" id='projectList'>
<thead>
<tr>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th class='w-160px'><?php echo $lang->project->code;?></th>
<th class="text-left"><?php echo $lang->project->name;?></th>
<th class='w-date'><?php echo $lang->project->begin;?></th>
<th class='w-date'><?php echo $lang->project->end;?></th>
<th class='w-status'><?php echo $lang->statusAB;?></th>
<th class='w-user'><?php echo $lang->team->role;?></th>
<th class='w-date'><?php echo $lang->team->join;?></th>
<th class='w-110px'><?php echo $lang->team->hours;?></th>
</tr>
</thead>
<tbody>
<?php foreach($projects as $project):?>
<?php $projectLink = $this->createLink('project', 'browse', "projectID=$project->id");?>
<tr>
<td><?php echo html::a($projectLink, $project->id);?></td>
<td class='text-left'><?php echo $project->code;?></td>
<td class='text-left'><?php echo html::a($projectLink, $project->name);?></td>
<td><?php echo $project->begin;?></td>
<td><?php echo $project->end;?></td>
<?php if(isset($project->delay)):?>
<td class='project-delay'><?php echo $lang->project->delayed;?></td>
<?php else:?>
<td class='project-<?php echo $project->status?>'><?php echo $lang->project->statusList[$project->status];?></td>
<?php endif;?>
<td><?php echo $project->role;?></td>
<td><?php echo $project->join;?></td>
<td><?php echo $project->hours;?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+32 -30
View File
@@ -20,35 +20,37 @@
<?php common::printLink('score', 'rule', '', $lang->my->scoreRule, '', "class='btn btn-primary'");?>
</div>
</div>
<div id="mainContent" class='main-content'>
<table class="main-table table table-fixed">
<thead>
<tr>
<th class="w-200px"><?php echo $lang->score->time; ?></th>
<th class="w-150px"><?php echo $lang->score->module; ?></th>
<th class="w-150px"><?php echo $lang->score->method; ?></th>
<th class="w-100px"><?php echo $lang->score->before; ?></th>
<th class="w-100px"><?php echo $lang->score->score; ?></th>
<th class="w-100px"><?php echo $lang->score->after; ?></th>
<th><?php echo $lang->score->desc; ?></th>
</tr>
</thead>
<tbody>
<?php foreach($scores as $score):?>
<tr>
<td><?php echo $score->time; ?></td>
<td><?php echo $lang->score->modules[$score->module]; ?></td>
<td><?php echo $lang->score->methods[$score->module][$score->method]; ?></td>
<td><?php echo $score->before; ?></td>
<td><?php echo $score->score; ?></td>
<td><?php echo $score->after; ?></td>
<td><?php echo $score->desc; ?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if($scores):?>
<div class="table-footer"><?php $pager->show('right', 'pagerjs');?></div>
<?php endif;?>
<div id="mainContent">
<form class='main-table'>
<table class="table table-fixed">
<thead>
<tr>
<th class="w-200px"><?php echo $lang->score->time; ?></th>
<th class="w-150px"><?php echo $lang->score->module; ?></th>
<th class="w-150px"><?php echo $lang->score->method; ?></th>
<th class="w-100px"><?php echo $lang->score->before; ?></th>
<th class="w-100px"><?php echo $lang->score->score; ?></th>
<th class="w-100px"><?php echo $lang->score->after; ?></th>
<th><?php echo $lang->score->desc; ?></th>
</tr>
</thead>
<tbody>
<?php foreach($scores as $score):?>
<tr>
<td><?php echo $score->time; ?></td>
<td><?php echo $lang->score->modules[$score->module]; ?></td>
<td><?php echo $lang->score->methods[$score->module][$score->method]; ?></td>
<td><?php echo $score->before; ?></td>
<td><?php echo $score->score; ?></td>
<td><?php echo $score->after; ?></td>
<td><?php echo $score->desc; ?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if($scores):?>
<div class="table-footer"><?php $pager->show('right', 'pagerjs');?></div>
<?php endif;?>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+26 -26
View File
@@ -30,7 +30,7 @@
<?php $vars = "type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr>
<th class="w-100px">
<th class="c-id">
<?php if($canBatchEdit or $canBatchClose):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
@@ -38,18 +38,18 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='w-50px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-150px'> <?php common::printOrderLink('project', $orderBy, $vars, $lang->task->project);?></th>
<th> <?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->task->assignedTo);?></th>
<th class='w-120px'> <?php common::printOrderLink('finishedBy', $orderBy, $vars, $lang->task->finishedBy);?></th>
<th class='w-60px'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->task->estimateAB);?></th>
<th class='w-70px'> <?php common::printOrderLink('consumed', $orderBy, $vars, $lang->task->consumedAB);?></th>
<th class='w-60px'> <?php common::printOrderLink('left', $orderBy, $vars, $lang->task->leftAB);?></th>
<th class='w-date'> <?php common::printOrderLink('deadline', $orderBy, $vars, $lang->task->deadlineAB);?></th>
<th class='w-70px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-180px'><?php echo $lang->actions;?></th>
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-project'> <?php common::printOrderLink('project', $orderBy, $vars, $lang->task->project);?></th>
<th class='c-name'> <?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->task->assignedTo);?></th>
<th class='c-user'> <?php common::printOrderLink('finishedBy', $orderBy, $vars, $lang->task->finishedBy);?></th>
<th class='c-hours'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->task->estimateAB);?></th>
<th class='c-hours'> <?php common::printOrderLink('consumed', $orderBy, $vars, $lang->task->consumedAB);?></th>
<th class='c-hours'> <?php common::printOrderLink('left', $orderBy, $vars, $lang->task->leftAB);?></th>
<th class='c-date'> <?php common::printOrderLink('deadline', $orderBy, $vars, $lang->task->deadlineAB);?></th>
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='c-actions-4'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
@@ -64,21 +64,21 @@
<?php endif;?>
<?php printf('%03d', $task->id);?>
</td>
<td><span class='label-pri <?php echo 'label-pri-' . $task->pri;?>'><?php echo zget($lang->task->priList, $task->pri);?></span></td>
<td class='nobr text-left' title="<?php echo $task->projectName;?>"><?php echo html::a($this->createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?></td>
<td class='text-left nobr'>
<?php if(!empty($task->team)) echo '<span class="label">' . $this->lang->task->multipleAB . '</span> ';?>
<?php if(!empty($task->parent)) echo '<span class="label">' . $this->lang->task->childrenAB . '</span> ';?>
<td class="c-pri"><span class='label-pri <?php echo 'label-pri-' . $task->pri;?>'><?php echo zget($lang->task->priList, $task->pri);?></span></td>
<td class='c-project' title="<?php echo $task->projectName;?>"><?php echo html::a($this->createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?></td>
<td class='c-name'>
<?php if(!empty($task->team)) echo '<span class="label label-badge label-light">' . $this->lang->task->multipleAB . '</span> ';?>
<?php if(!empty($task->parent)) echo '<span class="label label-badge label-light">' . $this->lang->task->childrenAB . '</span> ';?>
<?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), $task->name, null, "style='color: $task->color'");?>
</td>
<td><?php echo zget($users, $task->openedBy);?></td>
<td><?php echo zget($users, $task->assignedTo);?></td>
<td><?php echo zget($users, $task->finishedBy);?></td>
<td><?php echo $task->estimate;?></td>
<td><?php echo $task->consumed;?></td>
<td><?php echo $task->left;?></td>
<td class='<?php if(isset($task->delay)) echo 'delayed';?>'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
<td class='task-<?php echo $task->status;?>'><?php echo $lang->task->statusList[$task->status];?></td>
<td class='c-user'><?php echo zget($users, $task->openedBy);?></td>
<td class='c-user'><?php echo zget($users, $task->assignedTo);?></td>
<td class='c-user'><?php echo zget($users, $task->finishedBy);?></td>
<td class='c-hours'><?php echo $task->estimate;?></td>
<td class='c-hours'><?php echo $task->consumed;?></td>
<td class='c-hours'><?php echo $task->left;?></td>
<td class='c-date <?php if(isset($task->delay)) echo 'text-red';?>'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
<td class='c-status'><span class="status-<?php echo $task->status;?>"><span class="label label-dot"></span> <?php echo $lang->task->statusList[$task->status];?></span></td>
<td class='c-actions'>
<?php
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'list', 'hand-right', '', 'iframe', true);
+1 -1
View File
@@ -25,7 +25,7 @@
?>
</div>
</div>
<div id="mainContent" class='main-content'>
<div id="mainContent">
<form id='myCaseForm' class="main-table table-case" data-ride="table" method="post">
<table class="table has-sort-head" id='caseList'>
<?php
+46 -44
View File
@@ -22,50 +22,52 @@
?>
</div>
</div>
<div id="mainContent" class='main-content'>
<table class="main-table table table-fixed" id='taskList'>
<?php $vars = "type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th> <?php common::printOrderLink('name', $orderBy, $vars, $lang->testtask->name);?></th>
<th> <?php common::printOrderLink('project', $orderBy, $vars, $lang->testtask->project);?></th>
<th> <?php common::printOrderLink('build', $orderBy, $vars, $lang->testtask->build);?></th>
<th class='w-90px'> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->testtask->begin);?></th>
<th class='w-90px'> <?php common::printOrderLink('end', $orderBy, $vars, $lang->testtask->end);?></th>
<th class='w-80px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-150px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($tasks as $task):?>
<tr>
<td class="c-id"><?php printf('%03d', $task->id);?></td>
<td class='text-left nobr'><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id"), $task->name);?></td>
<td class='nobr'><?php echo $task->projectName?></td>
<td class='nobr'><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?></td>
<td><?php echo $task->begin?></td>
<td><?php echo $task->end?></td>
<td class='status-<?php echo $task->status?>'><?php echo $lang->testtask->statusList[$task->status];?></td>
<td class='c-actions'>
<?php
common::printIcon('testtask', 'cases', "taskID=$task->id", 'play', 'list', 'sitemap');
common::printIcon('testtask', 'linkCase', "taskID=$task->id", '', 'list', 'link');
common::printIcon('testtask', 'edit', "taskID=$task->id", '', 'list');
<div id="mainContent">
<form class='main-table'>
<table class="table has-sort-head table-fixed" id='taskList'>
<?php $vars = "type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th> <?php common::printOrderLink('name', $orderBy, $vars, $lang->testtask->name);?></th>
<th> <?php common::printOrderLink('project', $orderBy, $vars, $lang->testtask->project);?></th>
<th> <?php common::printOrderLink('build', $orderBy, $vars, $lang->testtask->build);?></th>
<th class='w-90px'> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->testtask->begin);?></th>
<th class='w-90px'> <?php common::printOrderLink('end', $orderBy, $vars, $lang->testtask->end);?></th>
<th class='w-80px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-150px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($tasks as $task):?>
<tr>
<td class="c-id"><?php printf('%03d', $task->id);?></td>
<td class='text-left nobr'><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id"), $task->name);?></td>
<td class='nobr'><?php echo $task->projectName?></td>
<td class='nobr'><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?></td>
<td><?php echo $task->begin?></td>
<td><?php echo $task->end?></td>
<td class='status-<?php echo $task->status?>'><?php echo $lang->testtask->statusList[$task->status];?></td>
<td class='c-actions'>
<?php
common::printIcon('testtask', 'cases', "taskID=$task->id", 'play', 'list', 'sitemap');
common::printIcon('testtask', 'linkCase', "taskID=$task->id", '', 'list', 'link');
common::printIcon('testtask', 'edit', "taskID=$task->id", '', 'list');
if(common::hasPriv('testtask', 'delete'))
{
$deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", '<i class="icon-trash"></i>', '', "title='{$lang->testtask->delete}' class='btn'");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if($tasks):?>
<div class="table-footer"><?php $pager->show('right', 'pagerjs');?></div>
<?php endif;?>
if(common::hasPriv('testtask', 'delete'))
{
$deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", '<i class="icon-trash"></i>', '', "title='{$lang->testtask->delete}' class='btn'");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if($tasks):?>
<div class="table-footer"><?php $pager->show('right', 'pagerjs');?></div>
<?php endif;?>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+57 -57
View File
@@ -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
*/
+2 -2
View File
@@ -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
*/
+2 -2
View File
@@ -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");
+3 -3
View File
@@ -89,9 +89,9 @@
?>
</div>
<?php
if(common::hasPriv('project', 'create')) echo html::a(helper::createLink('project', 'create', "projectID=&copyProjectID=&planID=$plan->id"), '<i class="icon-play"></i>', '', "class='btn btn-icon' title='{$lang->project->create}'");
if(common::hasPriv('productplan', 'linkStory')) echo html::a(inlink('view', "planID=$plan->id&type=story&orderBy=id_desc&link=true"), '<i class="icon-link"></i>', '', "class='btn btn-icon' title='{$lang->productplan->linkStory}'");
if(common::hasPriv('productplan', 'linkBug') and $config->global->flow != 'onlyStory') echo html::a(inlink('view', "planID=$plan->id&type=bug&orderBy=id_desc&link=true"), '<i class="icon-bug"></i>', '', "class='btn btn-icon' title='{$lang->productplan->linkBug}'");
if(common::hasPriv('project', 'create')) echo html::a(helper::createLink('project', 'create', "projectID=&copyProjectID=&planID=$plan->id"), '<i class="icon-play"></i>', '', "class='btn' title='{$lang->project->create}'");
if(common::hasPriv('productplan', 'linkStory')) echo html::a(inlink('view', "planID=$plan->id&type=story&orderBy=id_desc&link=true"), '<i class="icon-link"></i>', '', "class='btn' title='{$lang->productplan->linkStory}'");
if(common::hasPriv('productplan', 'linkBug') and $config->global->flow != 'onlyStory') echo html::a(inlink('view', "planID=$plan->id&type=bug&orderBy=id_desc&link=true"), '<i class="icon-bug"></i>', '', "class='btn' title='{$lang->productplan->linkBug}'");
common::printIcon('productplan', 'edit', "planID=$plan->id", $plan, 'list');
?>
</td>
+86 -2
View File
@@ -984,7 +984,7 @@ class project extends control
$acl = $copyProject->acl;
$whitelist = $copyProject->whitelist;
$products = $this->project->getProducts($copyProjectID);
}
}
if(!empty($planID))
{
@@ -1462,7 +1462,7 @@ class project extends control
$this->view->project = $project;
$this->view->projectID = $projectID;
$this->view->level = $type;
$this->view->tree = $tree;
$this->view->tree = $this->project->printTree($tree);
$this->display();
}
@@ -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();
}
}
+8 -8
View File
@@ -5,13 +5,13 @@
#productsBox .has-branch select {width: 100%; display: table-cell; border-radius: 0 2px 2px 0; border-left: none;}
#productsBox .has-branch select:focus {box-shadow: inset 1px 0 #4d90fe}
.table-children > td:first-child{border-left:2px solid #ccc;}
.table-children > td:last-child{border-right:2px solid #ccc;}
.fixed-left .table-children > td{border-right:none;}
.flexarea .table-children > td{border-left:none;border-right:none;}
.fixed-right .table-children > td{border-left:none;}
.table-children.table-child-top{border-top:2px solid #ccc;}
.table-children.table-child-bottom{border-bottom:2px solid #ccc;}
.table-striped>tbody>tr.table-children:nth-child(odd)>td, .table-striped>tbody>tr.table-children:nth-child(odd)>th{background-color:#fff;}
.table-children {border-left: 2px solid #cbd0db; border-right: 2px solid #cbd0db;}
.table-children.table-child-top {border-top: 2px solid #cbd0db;}
.table-children.table-child-bottom {border-bottom: 2px solid #cbd0db;}
.table td.has-child > .task-toggle {color: #838a9d; position: relative; top: -1px;}
.table td.has-child > .task-toggle:hover {color: #006af1; cursor: pointer;}
.table td.has-child > .task-toggle > .icon {font-size: 16px; display: inline-block; transition: transform .2s;}
.table td.has-child > .task-toggle > .icon:before {text-align: left;}
.table td.has-child > .task-toggle.collapsed > .icon {transform: rotate(-90deg);}
.chosen-container-single .chosen-single > span{max-width:200px;}
-29
View File
@@ -1,29 +0,0 @@
.red{color:red;}
.bug, .task {color:gray; font-size:9px}
.cont-lt1 .side{width:220px}
#hideButton{cursor:pointer;}
#hideButton span{padding:2px 10px; background:url(theme/default/images/main/zt-icons.png) -100px -161px;}
#featurebar .f-right .icon-green-task-import {padding:2px 8px; background:url(theme/default/images/main/zt-icons.png) 0px -82px;}
.sub-featurebar #querybox {margin:0px;}
.sub-featurebar #bysearchTab.active {padding:0px;}
.sub-featurebar #bysearchTab.active:hover {background:#fff;}
#createActionMenu .dropdown-menu {width:100%;}
.dropdown-menu.with-search {padding: 0; min-width: 150px; overflow: hidden; max-height: 302px;}
.dropdown-menu > .menu-search .input-group {width:100%;}
.dropdown-menu > .menu-search .input-group-addon {position: absolute; right: 10px; top: 0; z-index: 10; background: none; border: none; color: #666}
.dropdown-menu > .menu-search .form-control {border: none!important; box-shadow: none!important; border-top: 1px solid #ddd!important;}
.dropdown-list {display: block; padding: 0; max-height: 270px; overflow-y: auto;}
.dropdown-list > li > a {display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.53846154; color: #141414; white-space: nowrap;}
.dropdown-list > li > a:hover,
.dropdown-list > li > a:focus {color: #1a4f85;text-decoration: none;background-color: #ddd;}
.pl-5px{padding-left:5px;}
tbody > tr > td > .btn-icon {margin-right: 2px}
#projectTaskForm{padding:0px 1px;}
.table td.has-child > a {max-width: 90%; max-width: calc(100% - 30px); display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.table td.has-child > .task-toggle {position: relative; top: 1px}
+47 -31
View File
@@ -1,35 +1,51 @@
.no-padding {padding: 0!important;}
#taskTree li {padding: 0 0 0 8px;}
#taskTree li.has-list {padding-left: 20px;}
#taskTree li > a {display: block; padding: 5px 0; border-radius: 2px; padding-left: 6px;}
#taskTree li > a > span {display: inline-block;}
#taskTree li > a > span + span {margin-left: 8px;}
#taskTree li.selected > a {background-color: #E8F3FC;}
#taskTree li.selected > a > span.title {color: #006AF1;}
.label-product, #taskTree .item-product > a > .label-type {background: #88DE8B;}
.label-story, #taskTree .item-story > a > .label-type {background: #00A9FC;}
.label-module, #taskTree .item-module > a > .label-type {background: #52CEDD;}
.label-task, #taskTree .item-task > a > .label-type {background: #006AF1;}
#taskTree li > a > span.title {color: #3C4353; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;}
#taskTree li > a > span.user {color: #A6AAB8;}
#taskTree li > a > span.user > .icon-person {font-size: 14px; position: relative; top: -1px;}
#taskTree li > .list-toggle {transform: rotate(0deg); width: 16px; height: 16px; border: 4px solid #CBD0DB; border-radius: 2px; top: 7px;}
#taskTree li > .list-toggle:before {content: ' '; display: block; position: absolute; border: 1px solid #CBD0DB; top: 2px; left: -3px; right: -3px; bottom: 2px; min-width: 0; transition: all .2s;}
#taskTree li > .list-toggle:hover:before,
#taskTree li > .list-toggle:hover {border-color: #006AF1;}
#taskTree li.open > .list-toggle {width: 12px; height: 12px; top: 9px; background-color: #CBD0DB; border-width: 3px; left: 3px;}
#taskTree li.open > .list-toggle:before {border: none; height: 2px; width: 6px; left: 0; top: 2px; background: #fff;}
#taskTree li.open > .list-toggle:hover {background: #006AF1;}
#projectTree {margin-bottom: 0}
#projectTree .tree-item-id {display: inline-block; font-size: 12px; border: 1px solid #aaa; line-height: 14px; color: #666; padding: 0 2px; margin-right: 5px; min-width: 16px; text-align: center; border-radius: 1px;}
#projectTree .label-story {line-height: 14px; padding: 0 2px; font-size: 12px; display: inline-flex; margin-right: 5px; position: relative; top: -1px; background: #8666b8; color: #fff; border: 1px solid #8666b8; border-radius: 1px;}
#projectTree > .tree-action-item {display: none!important}
#projectTree li > .tree-item-wrapper > .tree-toggle {display: block}
#projectTree li > .tree-item-wrapper:hover {background-color: #edf3fe; cursor: pointer; margin-left: -20px; padding-left: 20px;}
#projectTree li {line-height: 24px; padding-top: 0; padding-bottom: 0}
#projectTree > li.open > .tree-item-wrapper {border-bottom: none}
#projectTree.tree li.has-list.open > ul:after {top: -10px; bottom: 17px; display: none}
#projectTree.tree ul > li.has-list:after {top: 10px}
#projectTree.tree ul > li:after {top: 11px}
#projectTree.tree ul > li:before {display: block; content: ' '; border: none; border-left: 1px dotted #999; top: -8px; bottom: 9px; left: -11px; position: absolute; width: auto; height: auto}
#projectTree.tree ul > li:last-child:before {bottom: auto; height: 19px}
#projectTree.tree ul > li > .tree-item-wrapper:before {display: none;}
#projectTree.tree ul > li.has-list > .tree-item-wrapper:before {display: none;}
#projectTree.tree ul > li.item-type-task > .tree-item-wrapper {padding-left: 15px; margin-left: -15px;}
#projectTree.tree ul > li.item-type-task > .tree-item-wrapper:hover {background-color: #edf3fe}
#projectTree.tree ul > li.item-type-task > .tree-item-wrapper:before {left: 0; z-index: 2}
#projectTree.tree li>.list-toggle {top: -2px}
#projectTree.tree li:before {display: none}
#projectTree .item-type-story > ul > li {padding-left: 10px;}
#projectTree .item-type-tasks > .tree-item-wrapper:hover {background-color: #f5f5f5}
#projectTree .task-assignto {display: inline-block; margin-left: 10px; color: #808080}
#projectTree .task-info {display: none;}
#projectTree .task-info > div {display: inline-block; margin: 0 5px;}
#projectTree .task-info > div.buttons {position: relative; top: 2px}
#projectTree .item-type-task:hover .task-info {display: inline-block; margin-left:10px;}
#taskTree ul > li:after {display: block; position: absolute; content: ' '; border-top: 2px solid #EDEFF3; top: 14px; left: -12px; z-index: 1; width: 10px;}
#taskTree ul > li:before,
#taskTree ul > li.has-list:before {background: none; content: ' '; display: block; position: absolute; width: auto; height: auto; border: none; border-left: 2px solid #EDEFF3; top: -13px; bottom: 12px; left: -12px;}
#taskTree ul > li:last-child:before {bottom: auto; height: 29px;}
#taskTree ul > li:first-child:before {top: -9px;}
#taskTree ul > li.tree-single-item:before {height: 23px;}
#taskTree ul > li.has-list:after {width: 14px;}
.tree-view-btn {min-width: 36px;}
.main > .panel > .panel-heading > .panel-actions {margin-top: -8px; margin-right: -12px;}
.tree-show-root .btn-tree-view[data-type="root"],
.btn-tree-view[data-type="all"] {display: none;}
.tree-show-root .btn-tree-view[data-type="all"] {display: inline-block;}
.label-task-count {background: #ddd; color: #333}
#itemContent {min-height: 200px;}
#mainContent > .side-col {width: 460px; display: table-cell; overflow: hidden; transition: width .2s;}
#mainContent > .side-col > .cell {opacity: 1; transition: opacity .2s .1s;}
#mainContent.hide-side > .side-col {display: table-cell; width: 0px;}
#mainContent.hide-side > .side-col > .cell {opacity: 0;}
h2.detail-title {font-size: 16px;}
h2.detail-title .label-id, h2.detail-title .label {top: -1px}
#itemContent > .detail:first-child {padding-top: 10px;}
.detail-content > .btn-toolbar {margin-top: 15px;}
.detail-content > .infos > span {display: inline-block;}
.detail-content > .infos > span + span {margin-left: 15px;}
.detail-content > .infos + .infos {margin-top: 5px;}
.detail + .detail {padding-top: 10px;}
.btn-comment.pull-right {z-index: 10;}
details .btn-comment.pull-right {right: 30px;}
+13 -22
View File
@@ -220,15 +220,15 @@ function loadBranch(){}
/* Auto compute the work days. */
$(function()
{
if(typeof(replaceID) != 'undefined')
{
setModal4List('iframe', replaceID, function($list)
{
$list.find('.progress-pie:visible').progressPie();
var datatable = $list.data('zui.datatable');
if(datatable) datatable.$datatable.find('.progress-pie:visible').progressPie();
});
}
// if(typeof(replaceID) != 'undefined')
// {
// setModal4List('iframe', replaceID, function($list)
// {
// $list.find('.progress-pie:visible').progressPie();
// var datatable = $list.data('zui.datatable');
// if(datatable) datatable.$datatable.find('.progress-pie:visible').progressPie();
// });
// }
$(".date").bind('dateSelected', function()
{
computeWorkDays(this.id);
@@ -239,19 +239,10 @@ $(function()
{
$(document).on('click', '.task-toggle', function(e)
{
var $toggleIcon = $(this).find('i');
var id = $(this).data('id');
if($toggleIcon.hasClass('icon-double-angle-down'))
{
$('tr.parent-'+id).show();
$toggleIcon.removeClass('icon-double-angle-down').addClass('icon-double-angle-up');
}
else if($toggleIcon.hasClass('icon-double-angle-up'))
{
$('tr.parent-'+id).hide();
$toggleIcon.removeClass('icon-double-angle-up').addClass('icon-double-angle-down');
}
var $toggle = $(this);
var id = $(this).data('id');
var isCollapsed = $toggle.toggleClass('collapsed').hasClass('collapsed');
$toggle.closest('tbody').find('tr.parent-' + id).toggle(!isCollapsed);
e.stopPropagation();
e.preventDefault();
+100
View File
@@ -0,0 +1,100 @@
$(function()
{
var $taskTree = $('#taskTree').tree(
{
name: 'taskTree',
initialState: 'preserve'
});
var taskTree = $taskTree.data('zui.tree');
// 根据列表展开树形列表
var showTreeLevel = function(level)
{
if (level === 'root')
{
taskTree.collapse();
}
else if (level === 'all')
{
taskTree.collapse();
taskTree.expand($taskTree.find('li.has-list'), true);
}
else if (level === 'task')
{
taskTree.collapse();
taskTree.show($taskTree.find('li.item-task').parent().parent(), true);
}
else if (level === 'story')
{
taskTree.collapse();
taskTree.show($taskTree.find('li.item-story').parent().parent(), true);
}
$('#main').toggleClass('tree-show-root', level === 'root');
};
$(document).on('click', '.btn-tree-view', function()
{
showTreeLevel($(this).data('type'));
});
// 第一次访问时,展示所以节点
if (!$.zui.store.get('zui.tree::taskTree#taskTree')) showTreeLevel('all');
// 在右侧显示内容
var $itemContent = $('#itemContent');
var $mainContent = $('#mainContent');
var isItemLoading = false, lastAjaxRequest;
var showItem = function(url, loadingText)
{
$.zui.messager.hide();
$mainContent.toggleClass('hide-side', !url);
if (!url)
{
$taskTree.find('li.selected').removeClass('selected');
isItemLoading = false;
return;
}
if (lastAjaxRequest) lastAjaxRequest.abort();
$itemContent.empty().addClass('loading').attr('data-loading', loadingText || '');
isItemLoading = true;
lastAjaxRequest = $.ajax(
{
url: url,
success: function(data)
{
if (!isItemLoading) return;
$itemContent.html(data).removeClass('loading');
lastAjaxRequest = null;
isItemLoading = false;
$itemContent.find('.text-limit').textLimit();
$itemContent.find('.histories').histories();
},
error: function()
{
$mainContent.addClass('hide-side');
isItemLoading = false;
$.zui.messager.danger(window.lang.timeout);
}
});
};
var stopPropagation = function(e) {e.stopPropagation();};
$taskTree.on('click', '.tree-link', function(e)
{
var $link = $(this);
showItem($link.attr('href'), $link.find('.title').text());
$taskTree.find('li.selected').removeClass('selected');
$link.closest('li').addClass('selected');
e.preventDefault();
stopPropagation(e);
});
$itemContent.on('click', stopPropagation);
$taskTree.on('click', stopPropagation);
$(document).on('click', function()
{
showItem(false);
});
});
+1 -1
View File
@@ -297,10 +297,10 @@ $lang->project->featureBar['task']['needconfirm'] = 'StoryChanged';
$lang->project->featureBar['task']['status'] = $lang->project->statusSelects[''];
$lang->project->treeLevel = array();
$lang->project->treeLevel['all'] = 'Expand All';
$lang->project->treeLevel['root'] = 'Collapse All';
$lang->project->treeLevel['story'] = 'Show Story';
$lang->project->treeLevel['task'] = 'Show Task';
$lang->project->treeLevel['all'] = 'Expand All';
global $config;
if($config->global->flow == 'onlyTask')
+3 -3
View File
@@ -305,10 +305,10 @@ $lang->project->featureBar['task']['needconfirm'] = '需求变动';
$lang->project->featureBar['task']['status'] = $lang->project->statusSelects[''];
$lang->project->treeLevel = array();
$lang->project->treeLevel['root'] = '全部折叠';
$lang->project->treeLevel['story'] = '显示需求';
$lang->project->treeLevel['task'] = '显示任务';
$lang->project->treeLevel['all'] = '全部展开';
$lang->project->treeLevel['root'] = '全部折叠';
$lang->project->treeLevel['story'] = '只看需求';
$lang->project->treeLevel['task'] = '只看任务';
global $config;
if($config->global->flow == 'onlyTask')
+55 -3
View File
@@ -1381,8 +1381,8 @@ class projectModel extends model
/**
* Stat story, task, bug data for project.
*
* @param int $projectID
*
* @param int $projectID
* @access public
* @return void
*/
@@ -2545,7 +2545,7 @@ class projectModel extends model
$taskGroups[$task->module][$task->story][$task->id] = $task;
if(!empty($childTasks[$task->id]))
{
$taskGroups[$task->module][$task->story][$task->id]->children = $childTasks[$task->id];
$taskGroups[$task->module][$task->story][$task->id]->children = $childTasks[$task->id];
}
}
}
@@ -2581,6 +2581,8 @@ class projectModel extends model
$storyItem->color = $story->color;
$storyItem->pri = $story->pri;
$storyItem->storyId = $story->id;
$storyItem->openedBy = $story->openedBy;
$storyItem->assignedTo = $story->assignedTo;
$storyItem->url = helper::createLink('story', 'view', "storyID=$story->id&version=$story->version&from=project&param=$projectID");
$storyItem->taskCreateUrl = helper::createLink('task', 'batchCreate', "projectID={$projectID}&story={$story->id}");
@@ -2661,9 +2663,11 @@ class projectModel extends model
$taskItem->color = $task->color;
$taskItem->pri = (int)$task->pri;
$taskItem->status = $task->status;
$taskItem->parent = $task->parent;
$taskItem->estimate = $task->estimate;
$taskItem->consumed = $task->consumed;
$taskItem->left = $task->left;
$taskItem->openedBy = $users[$task->openedBy];
$taskItem->assignedTo = $users[$task->assignedTo];
$taskItem->url = helper::createLink('task', 'view', "task=$task->id");
$taskItem->storyChanged = $story and $story->status == 'active' and $story->version > $story->taskVersion;
@@ -2735,4 +2739,52 @@ class projectModel extends model
}
return $productPlans;
}
/**
* Print html for tree.
*
* @param object $trees
* @access pubic
* @return string
*/
public function printTree($trees)
{
$html = '';
foreach($trees as $tree)
{
if(is_array($tree)) $tree = (object)$tree;
switch($tree->type)
{
case 'module':
$this->app->loadLang('tree');
$html .= "<li class='item-module'>";
$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('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;
case 'product':
$this->app->loadLang('product');
$html .= '<li class="item-product">';
$html .= '<a class="tree-toggle"><span class="label label-type">' . $this->lang->productCommon . '</span><span class="title">' . $tree->name . '</span></a>';
break;
case 'story':
$this->app->loadLang('story');
$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;
}
if(isset($tree->children))
{
$html .= '<ul>';
$html .= $this->printTree($tree->children);
$html .= '</ul>';
}
$html .= '</li>';
}
return $html;
}
}
+1 -1
View File
@@ -185,7 +185,7 @@ js::set('browseType', $browseType);
<?php foreach($task->children as $key => $child):?>
<?php $class = $key == 0 ? ' table-child-top' : '';?>
<?php $class .= ($key + 1 == count($task->children)) ? ' table-child-bottom' : '';?>
<tr class='text-center table-children<?php echo $class;?> parent-<?php echo $task->id;?>' data-id='<?php echo $child->id?>' data-status='<?php echo $child->status?>' data-estimate='<?php echo $child->estimate?>' data-consumed='<?php echo $child->consumed?>' data-left='<?php echo $child->left?>'>
<tr class='table-children<?php echo $class;?> parent-<?php echo $task->id;?>' data-id='<?php echo $child->id?>' data-status='<?php echo $child->status?>' data-estimate='<?php echo $child->estimate?>' data-consumed='<?php echo $child->consumed?>' data-left='<?php echo $child->left?>'>
<?php foreach($customFields as $field) $this->task->printCell($field, $child, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table', true);?>
</tr>
<?php endforeach;?>
+54 -186
View File
@@ -10,195 +10,63 @@
* @link http://www.zentao.net
*/
?>
<?php
include '../../common/view/header.html.php';
include './taskheader.html.php';
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php foreach ($lang->project->treeLevel as $name => $btnLevel):?>
<?php
$icon = '';
if($name == 'root') $icon = ' <i class="icon-fold-all"></i>';
if($name == 'all') $icon = ' <i class="icon-unfold-all"></i>';
?>
<button type='button' class='btn btn-link btn-tree-view' data-type='<?php echo $name ?>'><?php echo $btnLevel . $icon;?></button>
<?php endforeach; ?>
</div>
<div class="btn-toolbar pull-right">
<?php
if(!isset($browseType)) $browseType = '';
if(!isset($orderBy)) $orderBy = '';
$link = common::hasPriv('task', 'report', $project) ? $this->createLink('task', 'report', "project=$projectID&browseType=$browseType") : '#';
echo html::a($link, "<i class='icon icon-bar-chart muted'></i> <span class='text'>{$lang->task->reportChart}</span>", '', 'class="btn btn-link"');
?>
<div class="btn-group">
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-import muted"></i> <span class="text"><?php echo $lang->import ?></span> <span class="caret"></span></button>
<ul class="dropdown-menu">
<?php
$misc = common::hasPriv('project', 'importTask') ? '' : "class=disabled";
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
echo "<li>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
<div class='main'>
<div class='panel'>
<div class='panel-heading'>
<i class='icon icon-folder-close-alt'></i> <strong><?php echo $project->name ?></strong>
<div class='panel-actions pull-right'>
<div class='btn-group'>
<?php foreach ($lang->project->treeLevel as $name => $btnLevel):?>
<?php if($name == 'all') continue;?>
<button type='button' class='btn btn-sm tree-view-btn' data-type='<?php echo $name ?>'><?php echo $btnLevel ?></button>
<?php endforeach; ?>
</div>
</div>
</div>
<div class='panel-body'>
<ul id='projectTree' class='tree-lines'></ul>
$misc = common::hasPriv('project', 'importBug') ? '' : "class=disabled";
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
echo "<li>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
?>
</ul>
</div>
<?php
$misc = common::hasPriv('task', 'export', $project) ? "class='btn btn-link'" : "class='btn btn-link disabled'";
$link = common::hasPriv('task', 'export') ? $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=$browseType") : '#';
echo html::a($link, "<i class='icon icon-export muted'></i> <span class='text'>{$lang->export}</span>", '', $misc);
$misc = common::hasPriv('task', 'create', $project) ? "class='btn btn-primary'" : "class='btn btn-primary disabled'";
$link = common::hasPriv('task', 'create', $project) ? $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')) : '#';
echo html::a($link, "<i class='icon icon-plus'></i>" . $lang->task->create, '', $misc);
?>
</div>
</div>
<script>
var projectID = <?php echo $projectID?>;
$('#project<?php echo $projectID;?>').addClass('active')
$('#treeTab').addClass('active');
function setModalInTree(tree)
{
setModal4List('iframe', null, function()
{
$.cancelReloadCloseModal();
$.getJSON('<?php echo inlink('tree', "projectID=$projectID&type=json") ?>', function(newData)
{
tree.reload(newData);
setModalInTree(tree);
});
});
}
$(function()
{
var hoursFormat = '<?php echo $lang->project->hours ?>';
var viewLevel = '<?php echo $level ?>' || 'custom';
var data = $.parseJSON('<?php echo helper::jsonEncode4Parse($tree, JSON_HEX_QUOT | JSON_HEX_APOS);?>');
var $tree = $('#projectTree');
var statusMap = $.parseJSON('<?php echo helper::jsonEncode4Parse($lang->task->statusList);?>');
var selectCustomLevel = function() {$('.tree-view-btn.active').removeClass('active').filter('[data-type="custom"]').addClass('active');};
$tree.tree(
{
name: 'projectTasksTree',
initialState: !viewLevel || viewLevel === 'custom' ? 'preserve' : 'collapse',
data: data,
itemWrapper: true,
actions:
{
add:
{
title: '<?php echo $lang->project->batchWBS ?>',
template: '<a data-toggle="tooltip" href="javascript:;"><i class="icon icon-sitemap"></i>',
templateInList: false,
linkTemplate: '<?php echo helper::createLink('tree', 'edit', "moduleID={0}&type=task"); ?>'
},
},
action: function(event)
{
var action = event.action, $target = $(event.target), item = event.item;
if(action.type === 'add')
{
window.open(item.taskCreateUrl);
}
},
itemCreator: function($li, item)
{
$li.toggleClass('tree-toggle', item.type !== 'task' && item.type !== 'story').closest('li').addClass('item-type-' + item.type);
var $liWrapper = $li.find('.tree-item-wrapper');
if(item.type === 'product')
{
$liWrapper.append($('<span><i class="icon icon-cube text-muted"></i> ' + item.title + '</span>'));
}
else if(item.type === 'story')
{
$liWrapper.append('<span class="tree-item-id">' + item.storyId + ' </span><span class="label label-story"><?php echo $lang->story->common ?></span>').append($('<a>').attr({href: item.url}).text(item.title).css('color', item.color));
if(item.children && item.children.length)
{
if(item.tasksCount) $liWrapper.append(' <span class="label label-task-count label-badge">' + item.tasksCount + '</span>');
}
}
else if(item.type === 'task')
{
$liWrapper.append('<span class="tree-item-id">' + item.id + ' </span>').append($('<a>').attr({href: item.url}).text(item.title).css('color', item.color));
if(item.assignedTo) $liWrapper.append($('<span class="task-assignto"/>').html(item.assignedTo ? ('<i class="icon icon-user text-muted"></i> ' + item.assignedTo) : ''));
var $info = $('<div class="task-info clearfix"/>');
$info.append($('<div/>').addClass('status-' + item.status).text(statusMap[item.status]));
$info.append($('<div/>').text(hoursFormat.replace('%s', item.estimate).replace('%s', item.consumed).replace('%s', item.left)));
$info.append($('<div class="buttons"/>').html(item.buttons));
$liWrapper.append($info);
}
else if(item.type === 'tasks')
{
if(item.tasks && item.tasks.length)
{
var $table = $('<table class="table table-tasks table-fixed table-bordered table-condensed table-hover table-striped"><tbody></tbody></table>');
var $tbody = $table.find('tbody');
$.each(item.tasks, function(idx, task)
{
var $tr = $('<tr class="text-center"/>');
$tr.append($('<td/>').addClass('text-left').append($('<a>').attr({href: task.url}).text('#' + task.id + ' ' + task.title).css('color', task.color)));
$tr.append($('<td class="td-extra" width="30"/>').append('<span class="pri' + task.pri + '">' + (task.pri || '') + '</span>'));
$tr.append($('<td class="td-extra" width="90"/>').html(task.assignedTo ? ('<i class="icon icon-user text-muted"></i> ' + task.assignedTo) : ''));
$tr.append($('<td class="td-extra" width="70"/>').addClass(task.status).text(statusMap[task.status]));
$tr.append($('<td class="td-extra" width="140"/>').text(hoursFormat.replace('%s', task.estimate).replace('%s', task.consumed).replace('%s', task.left)));
$tr.append($('<td class="td-extra" width="150"/>').html(task.buttons));
$tbody.append($tr);
});
$liWrapper.append($table);
}
}
else if(item.type === 'unlinkStory')
{
$li.append($('<span class="tree-item-title"><i class="icon icon-tasks text-muted"></i> ' + item.title + '</span>'));
if(item.tasksCount) $li.append(' <span class="label label-task-count label-badge">' + item.tasksCount + '</span>');
}
else
{
if(item.type === 'module' && (!item.children || !item.children.length))
{
$li.remove();
}
else
{
$li.append($('<span class="tree-toggle"><i class="icon icon-bookmark-empty text-muted"></i> ' + (item.title || item.name) + '</span>'));
}
}
return true;
}
});
$('[data-toggle="tooltip"]').tooltip({container: 'body'});
var $currentLevelBtn = $('.tree-view-btn[data-type="' + viewLevel + '"]').addClass('active');
if(!$currentLevelBtn.length) selectCustomLevel();
var tree = $tree.data('zui.tree');
// Expand all nodes when user visit at first time of this day.
if(!tree.store.time || tree.store.time < (new Date().getTime() - 24*40*60*1000))
{
tree.show($('.item-type-tasks, .item-type-task').parent().parent());
}
$(document).on('click', '.tree-view-btn', function()
{
var hasActive = $(this).hasClass('active');
$('.tree-view-btn.active').removeClass('active');
var level = $(this).addClass('active').data('type');
if(level === 'task')
{
tree.collapse();
tree.show($('.item-type-tasks, .item-type-task').parent().parent());
}
if(level === 'root')
{
tree.collapse();
$(this).html(treeLevel.all);
if(hasActive)
{
$(this).removeClass('active');
$(this).html(treeLevel.root);
tree.show($('.item-type-tasks, .item-type-task').parent().parent());
tree.show($('.item-type-module').parent().parent());
tree.show($('.item-type-story').parent().parent());
}
}
else if(level === 'module')
{
tree.collapse();
tree.show($('.item-type-module').parent().parent());
}
else if(level === 'story')
{
tree.collapse();
tree.show($('.item-type-story').parent().parent());
}
});
setModalInTree(tree);
});
</script>
<?php js::set('treeLevel', $lang->project->treeLevel);?>
<div id="mainContent" class="main-row hide-side">
<div class="main-col">
<div class="cell">
<ul class="tree" id="taskTree">
<?php echo $tree;?>
</ul>
</div>
</div>
<div class="side-col">
<div class="cell">
<div id="itemContent" class="load-indicator loading"></div>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+288
View File
@@ -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=&param=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&param=$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> &nbsp;'; }?></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';?>
+82
View File
@@ -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';?>
+1 -1
View File
@@ -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"?';
+1 -1
View File
@@ -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,确认将任务状态改为"已完成"吗?';
+16 -8
View File
@@ -2243,8 +2243,7 @@ class taskModel extends model
if($id == 'deadline' and isset($task->delay)) $class .= ' delayed';
if($id == 'assignedTo')
{
$class .= ' c-actions text-left';
if($task->assignedTo == $account) $class .= ' red';
$class .= ' has-btn text-left';
}
$title = '';
@@ -2274,20 +2273,20 @@ class taskModel extends model
echo "</span>";
break;
case 'name':
if(!empty($task->children)) echo '<a class="task-toggle" data-id="' . $task->id . '"><i class="icon icon-caret-down"></i></a>';
if(!empty($task->product) && isset($branchGroups[$task->product][$task->branch])) echo "<span class='label label-info label-badge'>" . $branchGroups[$task->product][$task->branch] . '</span> ';
if(empty($task->children) and $task->module and isset($modulePairs[$task->module])) echo "<span class='label label-info label-badge'>" . $modulePairs[$task->module] . '</span> ';
if($child or !empty($task->parent)) echo '<span class="label">' . $this->lang->task->childrenAB . '</span> ';
if(!empty($task->team)) echo '<span class="label">' . $this->lang->task->multipleAB . '</span> ';
if($child or !empty($task->parent)) echo '<span class="label label-badge label-light">' . $this->lang->task->childrenAB . '</span> ';
if(!empty($task->team)) echo '<span class="label label-badge label-light">' . $this->lang->task->multipleAB . '</span> ';
echo $canView ? html::a($taskLink, $task->name, null, "style='color: $task->color'") : "<span style='color: $task->color'>$task->name</span>";
if($task->fromBug) echo html::a(helper::createLink('bug', 'view', "id=$task->fromBug"), "[BUG#$task->fromBug]", '_blank', "class='bug'");
if(!empty($task->children)) echo '<span class="task-toggle" data-id="' . $task->id . '">&nbsp;&nbsp;<i class="icon icon-double-angle-up"></i>&nbsp;&nbsp;</span>';
break;
case 'type':
echo $this->lang->task->typeList[$task->type];
break;
case 'status':
$storyChanged = (!empty($task->storyStatus) and $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion);
$storyChanged ? print("<span class='warning'>{$this->lang->story->changed}</span> ") : print($this->lang->task->statusList[$task->status]);
$storyChanged ? print("<span class='status-changed'><span class='label label-dot'></span> {$this->lang->story->changed}</span>") : print("<span class='status-{$task->status}'><span class='label label-dot'></span> {$this->lang->task->statusList[$task->status]}</span>");
break;
case 'estimate':
echo round($task->estimate, 1);
@@ -2317,8 +2316,17 @@ class taskModel extends model
echo $task->realStarted;
break;
case 'assignedTo':
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'list', '', '', 'iframe', true);
echo zget($users, $task->assignedTo);
$btnTextClass = '';
$assignedToText = $task->assignedTo;
if (empty($assignedToText))
{
$btnTextClass = 'text-primary';
$assignedToText = $this->lang->task->noAssigned;
}
else if ($assignedToText == $account) $btnTextClass = 'text-red';
$btnClass = $assignedToText == 'closed' ? ' disabled' : '';
echo html::a(helper::createLink('task', 'assignTo', "projectID=$task->project&taskID=$task->id"), "<i class='icon icon-hand-right'></i> <span class='{$btnTextClass}'>{$assignedToText}</span>", '', "class='iframe btn btn-icon-left{$btnClass}'");
break;
case 'assignedDate':
echo substr($task->assignedDate, 5, 11);
+1 -1
View File
@@ -49,7 +49,7 @@
$hiddenStory = ((isonlybody() and $storyID) || $this->config->global->flow == 'onlyTask') ? ' hidden' : '';
if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1;
?>
<form method='post' class='load-indicator main-form' enctype='multipart/form-data' target='hiddenwin' id="batchCreateForm">
<form method='post' class='load-indicator' enctype='multipart/form-data' target='hiddenwin' id="batchCreateForm">
<table class="table table-form" id="tableBody">
<thead>
<tr>
+1
View File
@@ -8,3 +8,4 @@
#todoBatchAddForm .control-time-begin + .chosen-container-single .chosen-single {border-radius: 2px 0 0 2px; border-right-width: 0; padding-right: 1px;}
#todoBatchAddForm .control-time-begin + .chosen-container-active .chosen-single {border-right-width: 1px; padding-right: 0;}
#todoBatchAddHeader [name="date"]:disabled {color: #ccc; text-decoration: line-through;}
.main-header > .input-group {width: 220px;}
+12 -25
View File
@@ -12,17 +12,10 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<div class="modal-content">
<div class="modal-header" id="todoBatchAddHeader">
<div class="modal-actions">
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=todo&section=custom&key=batchCreateFields')?>
<?php include '../../common/view/customfield.html.php';?>
<?php if(isonlybody()):?>
<div class="divider"></div>
<button id='closeModal' type="button" class="btn btn-link" data-dismiss="modal"><i class="icon icon-close"></i></button>
<?php endif;?>
</div>
<h4 class="modal-title pull-left"><?php echo $lang->todo->batchCreate . $lang->todo->common;?></h4>
<div id="mainContent" class="main-content">
<div class="main-header">
<h2><?php echo $lang->todo->batchCreate . $lang->todo->common;?></h2>
<div class="input-group pull-left">
<span class="input-group-addon"><?php echo $lang->todo->date;?></span>
<input type="text" name="date" value="<?php echo $date;?>" class="form-control form-date" autocomplete="off" />
@@ -33,6 +26,10 @@
</div>
</span>
</div>
<div class="pull-right btn-toolbar">
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=todo&section=custom&key=batchCreateFields')?>
<?php include '../../common/view/customfield.html.php';?>
</div>
</div>
<form id='todoBatchAddForm' class='modal-body' method='post' target='hiddenwin' action='<?php echo $this->createLink('todo', 'batchCreate');?>'>
<?php
@@ -90,15 +87,13 @@
</tfoot>
</table>
<div class="hidden">
<div class='checkbox-primary'>
<input type="hidden" name="date" value="<?php echo $date;?>" />
<input type="checkbox" name="switchDate" class="control-time-switch" />
<label></label>
</div>
<input type="hidden" name="date" value="<?php echo $date;?>" />
<input type="checkbox" name="switchDate" class="control-time-switch" />
</div>
</form>
</div>
<script language='Javascript'>
<script>
var $form = $('#todoBatchAddForm').on('change', '.control-time-switch', function()
{
var $checkbox = $(this);
@@ -119,13 +114,5 @@ $header.find('[name="date"]').on('change', function()
});
var batchCreateNum = '<?php echo $config->todo->batchCreate;?>';
<?php if(isonlybody()):?>
$(function()
{
parent.$('.modal-header').hide();
parent.$('.modal-body').css('padding', '0px');
$('#closeModal').click(function(){parent.$.closeModal();});
})
<?php endif;?>
</script>
<?php include './footer.html.php';?>
+1
View File
@@ -43,6 +43,7 @@ $lang->tree->successSave = 'Saved.';
$lang->tree->successFixed = 'Fixed.';
$lang->tree->repeatName = 'The name "%s" has existed!';
$lang->tree->module = 'Module';
$lang->tree->name = 'Name';
$lang->tree->line = 'Product Line';
$lang->tree->cate = 'Category Name';
+1
View File
@@ -43,6 +43,7 @@ $lang->tree->successSave = '成功保存';
$lang->tree->successFixed = '成功修正数据!';
$lang->tree->repeatName = '模块名“%s”已经存在!';
$lang->tree->module = '模块';
$lang->tree->name = '模块名称';
$lang->tree->line = '产品线名称';
$lang->tree->cate = '分类名称';
+137 -137
View File
@@ -15,8 +15,8 @@ class treeModel extends model
{
/**
* Get module by ID.
*
* @param int $moduleID
*
* @param int $moduleID
* @access public
* @return object
*/
@@ -27,10 +27,10 @@ class treeModel extends model
/**
* Build the sql query.
*
* @param int $rootID
* @param string $type
* @param int $startModule
*
* @param int $rootID
* @param string $type
* @param int $startModule
* @access public
* @return void
*/
@@ -67,15 +67,15 @@ class treeModel extends model
->beginIF((!empty($branch) and $branch != 'null'))->andWhere("branch")->eq($branch)->fi()
->andWhere('deleted')->eq(0)
->orderBy('grade desc, `order`')
->get();
->get();
}
/**
* Create an option menu in html.
*
* @param int $rootID
* @param string $type
* @param int $startModule
*
* @param int $rootID
* @param string $type
* @param int $startModule
* @access public
* @return string
*/
@@ -125,10 +125,10 @@ class treeModel extends model
/**
* Get module pairs.
*
* @param int $rootID
* @param string $viewType
* @param string $showModule
*
* @param int $rootID
* @param string $viewType
* @param string $showModule
* @access public
* @return array
*/
@@ -171,8 +171,8 @@ class treeModel extends model
}
/**
* Get line pairs.
*
* Get line pairs.
*
* @access public
* @return array
*/
@@ -183,9 +183,9 @@ class treeModel extends model
/**
* Create an option menu of task in html.
*
* @param int $rootID
* @param int $startModule
*
* @param int $rootID
* @param int $startModule
* @access public
* @return void
*/
@@ -195,14 +195,14 @@ class treeModel extends model
$products = $this->loadModel('product')->getProductsByProject($rootID);
$branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products));
if(!$this->isMergeModule($rootID, 'task') or !$products) return $this->getOptionMenu($rootID, 'task', $startModule);
if(!$this->isMergeModule($rootID, 'task') or !$products) return $this->getOptionMenu($rootID, 'task', $startModule);
/* createdVersion > 4.1. */
$startModulePath = '';
if($startModule > 0)
{
$startModule = $this->getById($startModule);
if($startModule)
if($startModule)
{
$startModulePath = $startModule->path . '%';
$modulePaths = explode(",", $startModulePath);
@@ -258,7 +258,7 @@ class treeModel extends model
}
foreach($topMenu as $moduleID => $moduleName)
{
if(!isset($projectModules[$moduleID])) unset($treeMenu[$moduleID]);
if(!isset($projectModules[$moduleID])) unset($treeMenu[$moduleID]);
}
}
}
@@ -267,11 +267,11 @@ class treeModel extends model
/**
* Build tree array.
*
* @param $&treeMenu
* @param array $modules
* @param object $module
* @param string $moduleName
*
* @param $&treeMenu
* @param array $modules
* @param object $module
* @param string $moduleName
* @access public
* @return void
*/
@@ -398,7 +398,7 @@ class treeModel extends model
if(!$this->isMergeModule($rootID, 'task') or !$products)
{
$extra['tip'] = false;
return $this->getTreeMenu($rootID, 'task', $startModule, $userFunc, $extra);
return $this->getTreeMenu($rootID, 'task', $startModule, $userFunc, $extra);
}
/* createdVersion > 4.1. */
@@ -487,7 +487,7 @@ class treeModel extends model
* @access public
* @return object
*/
public function getTaskStructure($rootID, $productID = 0, $manage = true)
public function getTaskStructure($rootID, $productID = 0, $manage = true)
{
$extra = array('projectID' => $rootID, 'productID' => $productID, 'tip' => true);
@@ -542,9 +542,9 @@ class treeModel extends model
/**
* Get tree structure.
*
* @param int $rootID
* @param string $type
*
* @param int $rootID
* @param string $type
* @access public
* @return array
*/
@@ -556,10 +556,10 @@ class treeModel extends model
/**
* Get project story tree menu.
*
* @param int $rootID
* @param int $startModule
* @param array $userFunc
*
* @param int $rootID
* @param int $startModule
* @param array $userFunc
* @access public
* @return string
*/
@@ -627,13 +627,13 @@ class treeModel extends model
/**
* Build tree.
*
* @param & $&treeMenu
* @param object $module
* @param string $type
* @param array $userFunc
* @param array $extra
* @param int $branch
*
* @param & $&treeMenu
* @param object $module
* @param string $type
* @param array $userFunc
* @param array $extra
* @param int $branch
* @access public
* @return void
*/
@@ -693,21 +693,21 @@ class treeModel extends model
if(isset($treeMenu[$module->id]) and !empty($treeMenu[$module->id]))
{
if(!isset($treeMenu[$module->parent])) $treeMenu[$module->parent] = '';
$treeMenu[$module->parent] .= "<li class='closed'>$linkHtml";
$treeMenu[$module->parent] .= "<li class='closed'>$linkHtml";
$treeMenu[$module->parent] .= "<ul>" . $treeMenu[$module->id] . "</ul>\n";
}
else
{
if(!isset($treeMenu[$module->parent])) $treeMenu[$module->parent] = "";
$treeMenu[$module->parent] .= "<li>$linkHtml\n";
$treeMenu[$module->parent] .= "<li>$linkHtml\n";
}
$treeMenu[$module->parent] .= "</li>\n";
$treeMenu[$module->parent] .= "</li>\n";
}
/**
* Get project modules.
*
* @param int $projectID
* Get project modules.
*
* @param int $projectID
* @param bool $parent
* @param bool $linkStory
* @access public
@@ -765,7 +765,7 @@ class treeModel extends model
/* Get all modules from paths. */
foreach($paths as $path)
{
$modules = explode(',', $path);
$modules = explode(',', $path);
foreach($modules as $module) $projectModules[$module] = $module;
}
return $projectModules;
@@ -773,9 +773,9 @@ class treeModel extends model
/**
* Create link of a story.
*
*
* @param string $type
* @param object $module
* @param object $module
* @access public
* @return string
*/
@@ -786,9 +786,9 @@ class treeModel extends model
/**
* Create link of a product line.
*
*
* @param string $type
* @param object $module
* @param object $module
* @param array $extra
* @access public
* @return string
@@ -802,10 +802,10 @@ class treeModel extends model
/**
* Create link of a task.
*
* @param string $type
* @param object $module
* @param array $extra
*
* @param string $type
* @param object $module
* @param array $extra
* @access public
* @return string
*/
@@ -817,11 +817,11 @@ class treeModel extends model
}
/**
* Create link of project story.
*
* @param string $type
* @param object $module
* @param array $extra
* Create link of project story.
*
* @param string $type
* @param object $module
* @param array $extra
* @access public
* @return string
*/
@@ -834,8 +834,8 @@ class treeModel extends model
/**
* Create link of a doc.
*
* @param object $module
*
* @param object $module
* @access public
* @return string
*/
@@ -846,8 +846,8 @@ class treeModel extends model
/**
* Create the manage link of a module.
*
* @param object $module
*
* @param object $module
* @access public
* @return string
*/
@@ -877,9 +877,9 @@ class treeModel extends model
/**
* Create the task manage link of a module.
*
* @param int $productID
* @param int $module
*
* @param int $productID
* @param int $module
* @access public
* @return void
*/
@@ -906,8 +906,8 @@ class treeModel extends model
/**
* Create link of a bug.
*
* @param object $module
*
* @param object $module
* @access public
* @return string
*/
@@ -918,8 +918,8 @@ class treeModel extends model
/**
* Create link of a test case.
*
* @param object $module
*
* @param object $module
* @access public
* @return string
*/
@@ -930,8 +930,8 @@ class treeModel extends model
/**
* Create link of a test task.
*
* @param object $module
*
* @param object $module
* @access public
* @return string
*/
@@ -941,10 +941,10 @@ class treeModel extends model
}
/**
* Create case lib link
*
* @param string $type
* @param string $module
* Create case lib link
*
* @param string $type
* @param string $module
* @access public
* @return string
*/
@@ -954,12 +954,12 @@ class treeModel extends model
}
/**
* Create branch link
*
* @param string $type
* @param int $rootID
* @param int $branchID
* @param string $branch
* Create branch link
*
* @param string $type
* @param int $rootID
* @param int $branchID
* @param string $branch
* @access public
* @return string
*/
@@ -972,10 +972,10 @@ class treeModel extends model
/**
* Get sons of a module.
*
* @param int $rootID
* @param int $moduleID
* @param string $type
*
* @param int $rootID
* @param int $moduleID
* @param string $type
* @access public
* @return array
*/
@@ -1010,10 +1010,10 @@ class treeModel extends model
/**
* Get sons of a task module.
*
* @param int $rootID
* @param int $productID
* @param int $moduleID
*
* @param int $rootID
* @param int $productID
* @param int $moduleID
* @access public
* @return void
*/
@@ -1043,8 +1043,8 @@ class treeModel extends model
/**
* Get id list of a module's childs.
*
* @param int $moduleID
*
* @param int $moduleID
* @access public
* @return array
*/
@@ -1059,10 +1059,10 @@ class treeModel extends model
}
/**
* Get project module.
*
* @param int $projectID
* @param int $productID
* Get project module.
*
* @param int $projectID
* @param int $productID
* @access public
* @return void
*/
@@ -1087,8 +1087,8 @@ class treeModel extends model
/**
* Get parents of a module.
*
* @param int $moduleID
*
* @param int $moduleID
* @access public
* @return array
*/
@@ -1103,8 +1103,8 @@ class treeModel extends model
/**
* Get product by moduleID.
*
* @param int $moduleID
*
* @param int $moduleID
* @access public
* @return void
*/
@@ -1122,8 +1122,8 @@ class treeModel extends model
/**
* Get the module that its type == 'story'.
*
* @param int $moduleID
*
* @param int $moduleID
* @access public
* @return void
*/
@@ -1185,8 +1185,8 @@ class treeModel extends model
/**
* Update modules' order.
*
* @param array $orders
*
* @param array $orders
* @access public
* @return void
*/
@@ -1291,7 +1291,7 @@ class treeModel extends model
/**
* Update a module.
*
* @param int $moduleID
* @param int $moduleID
* @access public
* @return void
*/
@@ -1316,11 +1316,11 @@ class treeModel extends model
/**
* Change root.
*
* @param int $moduleID
* @param int $oldRoot
* @param int $newRoot
* @param string $type
*
* @param int $moduleID
* @param int $oldRoot
* @param int $newRoot
* @param string $type
* @access public
* @return void
*/
@@ -1373,8 +1373,8 @@ class treeModel extends model
/**
* Delete a module.
*
* @param int $moduleID
*
* @param int $moduleID
* @param null $null compatible with that of model::delete()
* @access public
* @return void
@@ -1400,7 +1400,7 @@ class treeModel extends model
if($module->type == 'task') $this->dao->update(TABLE_TASK)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
if($module->type == 'bug') $this->dao->update(TABLE_BUG)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
if($module->type == 'case') $this->dao->update(TABLE_CASE)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
if($module->type == 'story')
if($module->type == 'story')
{
$this->dao->update(TABLE_STORY)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
$this->dao->update(TABLE_TASK)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
@@ -1414,8 +1414,8 @@ class treeModel extends model
/**
* Fix the path, grade fields according to the id and parent fields.
*
* @param string $root
* @param string $type
* @param string $root
* @param string $type
* @access public
* @return void
*/
@@ -1464,12 +1464,12 @@ class treeModel extends model
/**
* Check unique module name.
*
* @param int $rootID
* @param string $viewType
* @param int $parentModuleID
* @param array $modules
* @param array $branches
*
* @param int $rootID
* @param string $viewType
* @param int $parentModuleID
* @param array $modules
* @param array $branches
* @access public
* @return bool
*/
@@ -1505,9 +1505,9 @@ class treeModel extends model
/**
* Check merge module version.
*
* @param int $rootID
* @param string $viewType
*
* @param int $rootID
* @param string $viewType
* @access public
* @return bool
*/
@@ -1530,11 +1530,11 @@ class treeModel extends model
/**
* Get full trees.
*
* @param int $rootID
* @param string $viewType
* @param int $branch
* @param int $currentModuleID
*
* @param int $rootID
* @param string $viewType
* @param int $branch
* @param int $currentModuleID
* @access public
* @return array
*/
@@ -1578,7 +1578,7 @@ class treeModel extends model
* @access public
* @return array
*/
public function getDataStructure($stmt, $viewType, $keepModules = array())
public function getDataStructure($stmt, $viewType, $keepModules = array())
{
$parent = array();
while($module = $stmt->fetch())
@@ -1610,11 +1610,11 @@ class treeModel extends model
/**
* Get all doc structure.
*
*
* @access public
* @return array
*/
public function getDocStructure()
public function getDocStructure()
{
$stmt = $this->dbh->query($this->dao->select('*')->from(TABLE_MODULE)->where('type')->eq('doc')->get());
$parent = array();
+2 -3
View File
@@ -133,7 +133,6 @@ $lang->upgrade->fromVersions['9_6_3'] = '9.6.3';
$lang->upgrade->fromVersions['9_7'] = '9.7';
$lang->upgrade->fromVersions['9_8'] = '9.8';
$lang->upgrade->fromVersions['9_8_1'] = '9.8.1';
<<<<<<< HEAD
=======
$lang->upgrade->fromVersions['9_8_2'] = '9.8.2';
>>>>>>> zentaopms_9.8
$lang->upgrade->fromVersions['9_8_3'] = '9.8.3';
$lang->upgrade->fromVersions['10_0_beta'] = '10.0.beta';
+2 -3
View File
@@ -30,6 +30,7 @@ class upgradeModel extends model
*/
public function execute($fromVersion)
{
set_time_limit(0);
switch($fromVersion)
{
case '0_3beta': $this->execSQL($this->getUpgradeFile('0.3'));
@@ -1251,7 +1252,6 @@ class upgradeModel extends model
*/
public function adjustDocModule()
{
set_time_limit(0);
$this->app->loadLang('doc');
$productDocModules = $this->dao->select('*')->from(TABLE_MODULE)->where('type')->eq('productdoc')->orderBy('grade,id')->fetchAll('id');
$allProductIdList = $this->dao->select('id,name,acl,whitelist,createdBy')->from(TABLE_PRODUCT)->where('deleted')->eq('0')->fetchAll('id');
@@ -2257,7 +2257,7 @@ class upgradeModel extends model
* @access public
* @return bool
*/
public function addUniqueKeyToTeam()
public function addUniqueKeyToTeam()
{
$members = $this->dao->select('root, type, account')->from(TABLE_TEAM)->groupBy('root, type, account')->having('count(*)')->gt(1)->fetchAll();
@@ -2279,5 +2279,4 @@ class upgradeModel extends model
$this->dao->exec("ALTER TABLE " . TABLE_TEAM . " ADD UNIQUE `team` (`root`, `type`, `account`)");
return !dao::isError();
}
>>>>>>> zentaopms_9.8
}
-3
View File
@@ -1671,9 +1671,6 @@ needPing = true;
/* When body's ready, execute these. */
$(document).ready(function()
{
if(typeof(config.onlybody) != 'undefined' && config.onlybody == 'yes') checkOnlybodyPage();
$('body').addClass('m-{currentModule}-{currentMethod}'.format(config));
setTableBehavior();
setForm();
saveWindowSize();
+3 -3
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long