Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -259,6 +259,7 @@ $lang->task = new stdclass();
|
||||
$lang->build = new stdclass();
|
||||
$lang->task->menu = $lang->project->menu;
|
||||
$lang->build->menu = $lang->project->menu;
|
||||
$lang->build->menu->qa = array('link' => 'Build|project|build|projectID=%s', 'subModule' => 'bug,build,testtask', 'alias' => 'build,testtask', 'class' => 'dropdown dropdown-hover');
|
||||
|
||||
/* QA视图菜单设置。*/
|
||||
$lang->qa = new stdclass();
|
||||
|
||||
@@ -259,6 +259,7 @@ $lang->task = new stdclass();
|
||||
$lang->build = new stdclass();
|
||||
$lang->task->menu = $lang->project->menu;
|
||||
$lang->build->menu = $lang->project->menu;
|
||||
$lang->build->menu->qa = array('link' => '版本|project|build|projectID=%s', 'subModule' => 'bug,build,testtask', 'alias' => 'build,testtask', 'class' => 'dropdown dropdown-hover');
|
||||
|
||||
/* QA视图菜单设置。*/
|
||||
$lang->qa = new stdclass();
|
||||
|
||||
@@ -46,6 +46,7 @@ $lang->doc->users = 'Users';
|
||||
$lang->doc->item = ' Items';
|
||||
$lang->doc->num = 'Docs';
|
||||
$lang->doc->searchResult = 'Search Result';
|
||||
$lang->doc->gt = '>';
|
||||
|
||||
$lang->doc->moduleDoc = 'By Module';
|
||||
$lang->doc->searchDoc = 'Search';
|
||||
|
||||
@@ -46,6 +46,7 @@ $lang->doc->users = '用户';
|
||||
$lang->doc->item = '项';
|
||||
$lang->doc->num = '文档数量';
|
||||
$lang->doc->searchResult = '搜索结果';
|
||||
$lang->doc->gt = '>';
|
||||
|
||||
$lang->doc->moduleDoc = '按模块浏览';
|
||||
$lang->doc->searchDoc = '搜索';
|
||||
|
||||
@@ -1572,7 +1572,7 @@ class docModel extends model
|
||||
{
|
||||
$active = '';
|
||||
if($param == $parentID) $active = "class='active'";
|
||||
$title .= html::a(helper::createLink('doc', 'browse', "libID=$libID&browseType=byModule¶m={$parentID}"), ' > ' . $moduleName->name , '', "$active");
|
||||
$title .= html::a(helper::createLink('doc', 'browse', "libID=$libID&browseType=byModule¶m={$parentID}"), " {$this->lang->doc->gt} " . $moduleName->name , '', "$active");
|
||||
}
|
||||
|
||||
return $title;
|
||||
|
||||
@@ -30,10 +30,11 @@ $lang->entry->confirmDelete = 'Are you sure delete this entry?';
|
||||
$lang->entry->help = 'Help';
|
||||
|
||||
$lang->entry->note = new stdClass();
|
||||
$lang->entry->note->name = 'Name';
|
||||
$lang->entry->note->code = 'Code, should be english and number.';
|
||||
$lang->entry->note->ip = "Use comma between two IPs. IP segment is supported, e.g. 192.168.1.*";
|
||||
$lang->entry->note->allIP = 'All';
|
||||
$lang->entry->note->name = 'Name';
|
||||
$lang->entry->note->code = 'Code, should be english and number.';
|
||||
$lang->entry->note->ip = "Use comma between two IPs. IP segment is supported, e.g. 192.168.1.*";
|
||||
$lang->entry->note->allIP = 'All';
|
||||
$lang->entry->note->account = 'Account for entry.';
|
||||
|
||||
$lang->entry->errmsg['PARAM_CODE_MISSING'] = 'Param code is missing.';
|
||||
$lang->entry->errmsg['PARAM_TOKEN_MISSING'] = 'Param token is missing.';
|
||||
|
||||
@@ -30,10 +30,11 @@ $lang->entry->confirmDelete = '您确认要删除该应用吗?';
|
||||
$lang->entry->help = '使用说明';
|
||||
|
||||
$lang->entry->note = new stdClass();
|
||||
$lang->entry->note->name = '授权应用名称';
|
||||
$lang->entry->note->code = '授权应用代号,必须为字母或数字的组合';
|
||||
$lang->entry->note->ip = "允许访问API的应用ip,多个ip用逗号隔开。支持IP段,如192.168.1.*";
|
||||
$lang->entry->note->allIP = '无限制';
|
||||
$lang->entry->note->name = '授权应用名称';
|
||||
$lang->entry->note->code = '授权应用代号,必须为字母或数字的组合';
|
||||
$lang->entry->note->ip = "允许访问API的应用ip,多个ip用逗号隔开。支持IP段,如192.168.1.*";
|
||||
$lang->entry->note->allIP = '无限制';
|
||||
$lang->entry->note->account = '授权应用账号';
|
||||
|
||||
$lang->entry->errmsg['PARAM_CODE_MISSING'] = '缺少code参数';
|
||||
$lang->entry->errmsg['PARAM_TOKEN_MISSING'] = '缺少token参数';
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->account;?></th>
|
||||
<td><?php echo html::select("account", $users, '', "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::select("account", $users, '', "class='form-control chosen' data-placeholder='{$lang->entry->note->account}'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -13,6 +13,7 @@ $lang->misc = new stdclass();
|
||||
$lang->misc->common = 'Misc';
|
||||
$lang->misc->ping = 'Ping';
|
||||
$lang->misc->api = 'https://api.zentao.net';
|
||||
$lang->misc->enApi = 'http://api.zentao.pm';
|
||||
|
||||
$lang->misc->zentao = new stdclass();
|
||||
$lang->misc->zentao->version = 'Version %s';
|
||||
|
||||
@@ -13,6 +13,7 @@ $lang->misc = new stdclass();
|
||||
$lang->misc->common = '杂项';
|
||||
$lang->misc->ping = '防超时';
|
||||
$lang->misc->api = 'https://api.zentao.net';
|
||||
$lang->misc->enApi = 'http://api.zentao.pm';
|
||||
|
||||
$lang->misc->zentao = new stdclass();
|
||||
$lang->misc->zentao->version = '版本%s';
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<ul>
|
||||
<?php $api = $app->getClientLang() == 'en' ? $lang->misc->enApi : $lang->misc->api;?>
|
||||
<?php foreach($groupItems as $item => $label):?>
|
||||
<li><?php echo html::a($lang->misc->api . "/goto.php?item=$item&from=about", $label, '_blank', "id='$item'");;?></li>
|
||||
<li><?php echo html::a($api . "/goto.php?item=$item&from=about", $label, '_blank', "id='$item'");;?></li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -43,7 +43,7 @@ $lang->product->doc = 'Doc';
|
||||
$lang->product->project = $lang->projectCommon . 'List';
|
||||
$lang->product->build = 'Build';
|
||||
|
||||
$lang->product->currentProject = 'Current Project';
|
||||
$lang->product->currentProject = "Current {$lang->projectCommon}";
|
||||
$lang->product->activeStories = 'Activated Story';
|
||||
$lang->product->changedStories = 'Changed Story';
|
||||
$lang->product->draftStories = 'Draft Story';
|
||||
|
||||
@@ -43,7 +43,7 @@ $lang->product->doc = '文档列表';
|
||||
$lang->product->project = $lang->projectCommon . '列表';
|
||||
$lang->product->build = '版本列表';
|
||||
|
||||
$lang->product->currentProject = '当前项目';
|
||||
$lang->product->currentProject = '当前' . $lang->projectCommon;
|
||||
$lang->product->activeStories = '激活需求';
|
||||
$lang->product->changedStories = '已变更需求';
|
||||
$lang->product->draftStories = '草稿需求';
|
||||
|
||||
@@ -179,18 +179,6 @@ class project extends control
|
||||
/* Get tasks. */
|
||||
$tasks = $this->project->getTasks($productID, $projectID, $this->projects, $browseType, $queryID, $moduleID, $sort, $pager);
|
||||
|
||||
if(strpos('unclosed,all,bymodule,byproduct', $browseType) === false)
|
||||
{
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
if(isset($task->children))
|
||||
{
|
||||
$task->children = true;
|
||||
unset($task->children);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('project', 'task', "projectID=$projectID&status=bySearch¶m=myQueryID");
|
||||
$this->config->project->search['onMenuBar'] = 'yes';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.boards {display: table; table-layout: fixed; width: auto; }
|
||||
.boards {display: table; table-layout: fixed; width: auto; min-height: 50px;}
|
||||
.boards .board:not(:last-child) {border-right: 1px solid #ddd;}
|
||||
.board {display: table-cell; width: 16.666666667%; padding: 10px; border: 1px solid transparent; transition: background-color .2s, opacity .2s; vertical-align: top;}
|
||||
.board-item {border: 1px solid #EBEBEB; padding: 5px 10px; cursor: move; border-radius: 2px; background-color: #fff; transition: border .2s, opacity .2s; overflow: hidden;}
|
||||
|
||||
+23
-15
@@ -1,15 +1,19 @@
|
||||
$(function()
|
||||
{
|
||||
$('.c-boards').each(function()
|
||||
var adjustBoardsHeight = function()
|
||||
{
|
||||
var height = $(window).height() - $('#header').height() - $('#footer').height() - 40 - 105;
|
||||
var $boardsWrapper = $(this).find('.boards-wrapper');
|
||||
$boardsWrapper.height(height);
|
||||
if($boardsWrapper.height() > $boardsWrapper.find('.boards').height())
|
||||
$('.c-boards').each(function()
|
||||
{
|
||||
$boardsWrapper.find('.boards').css('height', $(this).height() - 1);
|
||||
}
|
||||
});
|
||||
var height = $(window).height() - $('#header').height() - $('#footer').height() - 40 - 105;
|
||||
var $boardsWrapper = $(this).find('.boards-wrapper');
|
||||
$boardsWrapper.height(height);
|
||||
if($boardsWrapper.height() > $boardsWrapper.find('.boards').height())
|
||||
{
|
||||
$boardsWrapper.find('.boards').css('height', $(this).height() - 1);
|
||||
}
|
||||
});
|
||||
};
|
||||
adjustBoardsHeight();
|
||||
|
||||
var boardID = '';
|
||||
var onlybody = config.requestType == 'GET' ? "&onlybody=yes" : "?onlybody=yes";
|
||||
@@ -44,23 +48,23 @@ $(function()
|
||||
outer.style.visibility = "hidden";
|
||||
outer.style.width = "100px";
|
||||
outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps
|
||||
|
||||
|
||||
document.body.appendChild(outer);
|
||||
|
||||
|
||||
var widthNoScroll = outer.offsetWidth;
|
||||
// force scrollbars
|
||||
outer.style.overflow = "scroll";
|
||||
|
||||
|
||||
// add innerdiv
|
||||
var inner = document.createElement("div");
|
||||
inner.style.width = "100%";
|
||||
outer.appendChild(inner);
|
||||
|
||||
outer.appendChild(inner);
|
||||
|
||||
var widthWithScroll = inner.offsetWidth;
|
||||
|
||||
// remove divs
|
||||
outer.parentNode.removeChild(outer);
|
||||
|
||||
|
||||
return widthNoScroll - widthWithScroll;
|
||||
};
|
||||
|
||||
@@ -86,7 +90,11 @@ $(function()
|
||||
{
|
||||
var selfClose = $.cookie('selfClose');
|
||||
$.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot});
|
||||
if(selfClose == 1) $kanban.load(location.href + ' #kanban', fixBoardWidth);
|
||||
if(selfClose == 1) $kanban.load(location.href + ' #kanban', function()
|
||||
{
|
||||
fixBoardWidth();
|
||||
adjustBoardsHeight();
|
||||
});
|
||||
};
|
||||
|
||||
var kanbanModalTrigger = new $.zui.ModalTrigger({type: 'iframe', width:800});
|
||||
|
||||
@@ -2009,9 +2009,22 @@ class projectModel extends model
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t1.id')->in(array_keys($taskIdList))
|
||||
->orderBy($orderBy)
|
||||
->fetchAll();
|
||||
$this->loadModel('task')->processTasks($tasks);
|
||||
return $tasks;
|
||||
->fetchAll('id');
|
||||
|
||||
if(empty($tasks)) return array();
|
||||
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
if($task->parent > 0)
|
||||
{
|
||||
if(isset($tasks[$task->parent]))
|
||||
{
|
||||
$tasks[$task->parent]->children[$task->id] = $task;
|
||||
unset($tasks[$task->id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->loadModel('task')->processTasks($tasks);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2023,7 +2036,7 @@ class projectModel extends model
|
||||
* @param int $pager
|
||||
* @param int $orderBy
|
||||
* @access public
|
||||
* @return void
|
||||
* @return mixed
|
||||
*/
|
||||
public function getSearchBugs($products, $projectID, $sql, $pager, $orderBy)
|
||||
{
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row row-grid">
|
||||
<?php if(common::hasPriv('project', 'objectLibs')):?>
|
||||
<?php if(common::hasPriv('doc', 'objectLibs')):?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($docLibs as $libID => $docLib):?>
|
||||
<?php if($i > 8) break;?>
|
||||
|
||||
@@ -68,8 +68,8 @@
|
||||
<div data-ride='table'>
|
||||
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id="workload">
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class="w-200px"><?php echo $lang->report->user;?></th>
|
||||
<tr class='colhead text-center'>
|
||||
<th class="w-100px"><?php echo $lang->report->user;?></th>
|
||||
<th><?php echo $lang->report->project;?></th>
|
||||
<th class="w-100px"><?php echo $lang->report->task;?></th>
|
||||
<th class="w-100px"><?php echo $lang->report->remain;?></th>
|
||||
@@ -88,19 +88,13 @@
|
||||
<?php foreach($load['task'] as $project => $info):?>
|
||||
<?php $class = $color ? 'rowcolor' : '';?>
|
||||
<?php if($id != 1) echo '<tr class="text-center">';?>
|
||||
<td class="<?php echo $class;?>"><?php echo html::a($this->createLink('project', 'view', "projectID={$info['projectID']}"), $project);?></td>
|
||||
<td class="<?php echo $class;?> text-center"><?php echo $info['count'];?></td>
|
||||
<td class="<?php echo $class;?> text-center"><?php echo $info['manhour'];?></td>
|
||||
<td title='<?php echo $project?>' class="<?php echo $class;?> text-left"><?php echo html::a($this->createLink('project', 'view', "projectID={$info['projectID']}"), $project);?></td>
|
||||
<td class="<?php echo $class;?>"><?php echo $info['count'];?></td>
|
||||
<td class="<?php echo $class;?>"><?php echo $info['manhour'];?></td>
|
||||
<?php if($id == 1):?>
|
||||
<td rowspan="<?php echo count($load['task']);?>" class="text-center">
|
||||
<?php echo $load['total']['count'];?>
|
||||
</td>
|
||||
<td rowspan="<?php echo count($load['task']);?>" class="text-center">
|
||||
<?php echo $load['total']['manhour'];?>
|
||||
</td>
|
||||
<td rowspan="<?php echo count($load['task']);?>" class="text-center">
|
||||
<?php echo round($load['total']['manhour'] / $allHour * 100, 2) . '%';?>
|
||||
</td>
|
||||
<td rowspan="<?php echo count($load['task']);?>"><?php echo $load['total']['count'];?></td>
|
||||
<td rowspan="<?php echo count($load['task']);?>"><?php echo $load['total']['manhour'];?></td>
|
||||
<td rowspan="<?php echo count($load['task']);?>"><?php echo round($load['total']['manhour'] / $allHour * 100, 2) . '%';?></td>
|
||||
<?php endif;?>
|
||||
<?php if($id != 1) echo '</tr>'; $id ++;?>
|
||||
<?php $color = !$color;?>
|
||||
|
||||
@@ -1401,7 +1401,7 @@ class story extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt = $this->dbh->query($this->session->storyQueryCondition . ($this->post->exportType == 'selected' ? " AND t1.id IN({$this->cookie->checkedItem})" : '') . " ORDER BY " . strtr($orderBy, '_', ' '));
|
||||
$stmt = $this->dbh->query($this->session->storyQueryCondition . ($this->post->exportType == 'selected' ? " AND t2.id IN({$this->cookie->checkedItem})" : '') . " ORDER BY " . strtr($orderBy, '_', ' '));
|
||||
while($row = $stmt->fetch()) $stories[$row->id] = $row;
|
||||
}
|
||||
|
||||
|
||||
@@ -2320,6 +2320,11 @@ class storyModel extends model
|
||||
$title = $story->planTitle;
|
||||
$class .= ' text-ellipsis';
|
||||
}
|
||||
if($id == 'sourceNote')
|
||||
{
|
||||
$title = $story->sourceNote;
|
||||
$class .= ' text-ellipsis';
|
||||
}
|
||||
|
||||
echo "<td class='" . $class . "' title='$title'>";
|
||||
switch($id)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
echo "</div>";
|
||||
}
|
||||
|
||||
if($from == 'project') common::printIcon('task', 'create', "project=$param&storyID=$story->id&moduleID=$story->module", $story, 'button', 'smile', '', 'showinonlybody');
|
||||
if($from == 'project') common::printIcon('task', 'create', "project=$param&storyID=$story->id&moduleID=$story->module", $story, 'button', 'plus', '', 'showinonlybody');
|
||||
|
||||
echo "<div class='divider'></div>";
|
||||
common::printIcon('story', 'edit', "storyID=$story->id", $story);
|
||||
|
||||
+54
-30
@@ -270,6 +270,7 @@ class taskModel extends model
|
||||
{
|
||||
$this->updateParentStatus($taskID);
|
||||
$this->computeBeginAndEnd($parentID);
|
||||
$this->dao->update(TABLE_TASK)->set('parent')->eq(-1)->where('id')->eq($parentID)->exec();
|
||||
}
|
||||
return $mails;
|
||||
}
|
||||
@@ -429,7 +430,6 @@ class taskModel extends model
|
||||
|
||||
$task->lastEditedBy = $this->app->user->account;
|
||||
$task->lastEditedDate = $now;
|
||||
$task->parent = -1;
|
||||
$this->dao->update(TABLE_TASK)->data($task)->where('id')->eq($parentID)->exec();
|
||||
if(!dao::isError())
|
||||
{
|
||||
@@ -932,6 +932,8 @@ class taskModel extends model
|
||||
|
||||
$task = $this->computeHours4Multiple($oldTask, $task);
|
||||
}
|
||||
|
||||
if($oldTask->parent > 0) $this->updateParentStatus($taskID);
|
||||
|
||||
$this->dao->update(TABLE_TASK)
|
||||
->data($task)
|
||||
@@ -1487,7 +1489,7 @@ class taskModel extends model
|
||||
->leftJoin(TABLE_TEAM)->alias('t4')->on('t4.root = t1.id')
|
||||
->leftJoin(TABLE_MODULE)->alias('t5')->on('t1.module = t5.id')
|
||||
->where('t1.project')->eq((int)$projectID)
|
||||
->beginIF($type =='all' || is_array($type))->andWhere('t1.parent')->lt(1)->fi()
|
||||
->beginIF($type == 'all' || is_array($type))->andWhere('t1.parent')->lt(1)->fi()
|
||||
->beginIF($type == 'myinvolved')
|
||||
->andWhere("((t4.`account` = '{$this->app->user->account}' AND t4.`type` = 'task') OR t1.`assignedTo` = '{$this->app->user->account}' OR t1.`finishedby` = '{$this->app->user->account}')")
|
||||
->fi()
|
||||
@@ -1519,38 +1521,57 @@ class taskModel extends model
|
||||
foreach($taskTeam as $taskID => $team) $tasks[$taskID]->team = $team;
|
||||
}
|
||||
|
||||
/* Select children task. */
|
||||
$children = $this->dao->select('DISTINCT t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
|
||||
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
|
||||
->leftJoin(TABLE_MODULE)->alias('t4')->on('t1.module = t4.id')
|
||||
->where('t1.project')->eq((int)$projectID)
|
||||
->andWhere('t1.parent')->in($taskList)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF($productID)->andWhere("((t4.root=" . (int)$productID . " and t4.type='story') OR t2.product=" . (int)$productID . ")")->fi()
|
||||
->beginIF($type == 'undone')->andWhere("(t1.status = 'wait' or t1.status ='doing')")->fi()
|
||||
->beginIF($type == 'needconfirm')->andWhere('t2.version > t1.storyVersion')->andWhere("t2.status = 'active'")->fi()
|
||||
->beginIF($type == 'assignedtome')->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi()
|
||||
->beginIF($type == 'finishedbyme')
|
||||
->andWhere('t1.finishedby', 1)->eq($this->app->user->account)
|
||||
->orWhere('t1.finishedList')->like("%,{$this->app->user->account},%")
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->beginIF($type == 'delayed')->andWhere('t1.deadline')->gt('1970-1-1')->andWhere('t1.deadline')->lt(date(DT_DATE1))->andWhere('t1.status')->in('wait,doing')->fi()
|
||||
->beginIF(is_array($type) or strpos(',all,undone,needconfirm,assignedtome,delayed,finishedbyme,myinvolved,', ",$type,") === false)->andWhere('t1.status')->in($type)->fi()
|
||||
->beginIF($modules)->andWhere('t1.module')->in($modules)->fi()
|
||||
->orderBy("t1.$orderBy")
|
||||
->fetchAll('id');
|
||||
|
||||
if(!empty($children))
|
||||
$parents = [];
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
foreach($children as $child)
|
||||
if($task->parent == -1) $parents[] = $task->id;
|
||||
}
|
||||
if(!empty($parents))
|
||||
{
|
||||
/* Select children task. */
|
||||
$children = $this->dao->select('DISTINCT t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
|
||||
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
|
||||
->leftJoin(TABLE_MODULE)->alias('t4')->on('t1.module = t4.id')
|
||||
->where('t1.parent')->in($parents)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF($productID)->andWhere("((t4.root=" . (int)$productID . " and t4.type='story') OR t2.product=" . (int)$productID . ")")->fi()
|
||||
->beginIF($type == 'undone')->andWhere("(t1.status = 'wait' or t1.status ='doing')")->fi()
|
||||
->beginIF($type == 'needconfirm')->andWhere('t2.version > t1.storyVersion')->andWhere("t2.status = 'active'")->fi()
|
||||
->beginIF($type == 'assignedtome')->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi()
|
||||
->beginIF($type == 'finishedbyme')
|
||||
->andWhere('t1.finishedby', 1)->eq($this->app->user->account)
|
||||
->orWhere('t1.finishedList')->like("%,{$this->app->user->account},%")
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->beginIF($type == 'delayed')->andWhere('t1.deadline')->gt('1970-1-1')->andWhere('t1.deadline')->lt(date(DT_DATE1))->andWhere('t1.status')->in('wait,doing')->fi()
|
||||
->beginIF(is_array($type) or strpos(',all,undone,needconfirm,assignedtome,delayed,finishedbyme,myinvolved,', ",$type,") === false)->andWhere('t1.status')->in($type)->fi()
|
||||
->beginIF($modules)->andWhere('t1.module')->in($modules)->fi()
|
||||
->orderBy("t1.$orderBy")
|
||||
->fetchAll('id');
|
||||
|
||||
if(!empty($children))
|
||||
{
|
||||
$tasks[$child->parent]->children[] = $child;
|
||||
foreach($children as $child)
|
||||
{
|
||||
$tasks[$child->parent]->children[$child->id] = $child;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
if($task->parent > 0)
|
||||
{
|
||||
if(isset($tasks[$task->parent]))
|
||||
{
|
||||
$tasks[$task->parent]->children[$task->id] = $task;
|
||||
unset($tasks[$task->id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->processTasks($tasks);
|
||||
}
|
||||
|
||||
@@ -1870,7 +1891,10 @@ class taskModel extends model
|
||||
$task = $this->processTask($task);
|
||||
if(!empty($task->children))
|
||||
{
|
||||
foreach($task->children as $child) $task = $this->processTask($child);
|
||||
foreach($task->children as $child)
|
||||
{
|
||||
$tasks[$task->id]->children[$child->id] = $this->processTask($child);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $tasks;
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
echo "<th class='step-id'>$stepId</th>";
|
||||
echo "<td class='text-left'><div class='input-group'>";
|
||||
if($step->type == 'item') echo "<span class='step-item-id'>{$stepId}.{$childId}</span>";
|
||||
echo nl2br($step->desc) . "</td>";
|
||||
echo "<td class='text-left'>" . nl2br($step->expect) . "</div></td>";
|
||||
echo nl2br(str_replace(' ', ' ', $step->desc)) . "</td>";
|
||||
echo "<td class='text-left'>" . nl2br(str_replace(' ', ' ', $step->expect)) . "</div></td>";
|
||||
echo "</tr>";
|
||||
$childId ++;
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ class todo extends control
|
||||
$this->lang->set('menugroup.todo', $from);
|
||||
}
|
||||
|
||||
$this->view->title = "{$this->lang->todo->common} #$todo->id $todo->name";
|
||||
$this->view->title = $this->app->user->account == $todo->account ? "{$this->lang->todo->common} #$todo->id $todo->name" : $this->lang->todo->common ;
|
||||
$this->view->position[] = $this->lang->todo->view;
|
||||
$this->view->todo = $todo;
|
||||
$this->view->times = date::buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
|
||||
@@ -383,14 +383,13 @@ class todoModel extends model
|
||||
->beginIF($begin)->andWhere('date')->ge($begin)->fi()
|
||||
->beginIF($end)->andWhere('date')->le($end)->fi()
|
||||
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi()
|
||||
->beginIF($status == 'undone')->andWhere('status')->ne('done')->fi()
|
||||
->beginIF($status == 'undone')->andWhere('status')->notin('done,closed')->fi()
|
||||
->beginIF($date == 'cycle')->andWhere('cycle')->eq('1')->fi()
|
||||
->beginIF($date != 'cycle')->andWhere('cycle')->eq('0')->fi()
|
||||
->orderBy($orderBy)
|
||||
->beginIF($limit > 0)->limit($limit)->fi()
|
||||
->page($pager)
|
||||
->query();
|
||||
|
||||
/* Set session. */
|
||||
$sql = explode('WHERE', $this->dao->get());
|
||||
$sql = explode('ORDER', $sql[1]);
|
||||
|
||||
@@ -2,7 +2,7 @@ body {background: #1183fb linear-gradient(-90deg, #0a48d1 0%, #1183fb 100%); bac
|
||||
#login {max-width: 600px!important; margin: 0 auto; margin-top: 5%;}
|
||||
#loginPanel {background: #fff; overflow: hidden; box-shadow: 0 0 20px 0 rgba(0,0,0,.1); border-radius: 3px;}
|
||||
#loginPanel > header {padding: 20px; border-bottom: 1px #eee solid; position: relative;}
|
||||
#loginPanel > header > h2 {font-size: 16px; margin: 0; line-height: 32px;}
|
||||
#loginPanel > header > h2 {font-size: 16px; margin: 0; line-height: 32px; max-width: 83%;}
|
||||
#loginPanel > header > .actions {position: absolute; right: 20px; top: 20px;}
|
||||
#loginPanel > .table-row {margin: 20px 0;}
|
||||
#loginPanel .table-form > tbody > tr > th {width: 60px;}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<table align='center' class="table table-form">
|
||||
<tr>
|
||||
<th class='w-verifyPassword'><?php echo $lang->user->dept;?></th>
|
||||
<td class='w-p50'><?php echo html::select('dept', $depts, $deptID, "class='form-control chosen'");?></td>
|
||||
<td class='w-p40'><?php echo html::select('dept', $depts, $deptID, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->account;?></th>
|
||||
@@ -83,7 +83,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'>
|
||||
<th></th>
|
||||
<td colspan='2' class='text-left form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton();?>
|
||||
</td>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user