This commit is contained in:
holan20180123
2021-08-16 16:16:50 +08:00
32 changed files with 156 additions and 98 deletions
+17 -1
View File
@@ -1901,6 +1901,22 @@ class execution extends control
}
$statusCount[$status] += isset($kanbanGroup[$projectID][$status]) ? count($kanbanGroup[$projectID][$status]) : 0;
/* Up to five closed executions are displayed. */
if($status == 'closed')
{
if(isset($myExecutions[$status]) and count($myExecutions[$status]) >= 5)
{
$myExecutions[$status] = array_slice($myExecutions[$status], 0, 5, true);
$myExecutions[$status]['more'] = $this->lang->execution->showMore;
}
if(isset($kanbanGroup[$projectID][$status]) and count($kanbanGroup[$projectID][$status]) >= 5)
{
$kanbanGroup[$projectID][$status] = array_slice($kanbanGroup[$projectID][$status], 0, 5, true);
$kanbanGroup[$projectID][$status]['more'] = $this->lang->execution->showMore;
}
}
}
if(empty($kanbanGroup[$projectID])) continue;
@@ -2686,7 +2702,7 @@ class execution extends control
{
$orderedExecutions = array();
$projects = $this->loadModel('program')->getProjectList(0, 'all', 0, 'order_asc');
$projects = $this->loadModel('program')->getProjectList(0, 'all', 0, 'order_asc', null, 0, 0, true);
$executionGroups = $this->dao->select('*')->from(TABLE_EXECUTION)
->where('deleted')->eq(0)
->andWhere('type')->in('sprint,stage')
+1
View File
@@ -100,6 +100,7 @@ $lang->execution->copyNoExecution = 'There are no ' . $lang->executionCommon . '
$lang->execution->noTeam = 'No team members at the moment';
$lang->execution->or = ' or ';
$lang->execution->selectProject = 'Please select project';
$lang->execution->showMore = 'View closed executions';
if($this->config->systemMode == 'new') $lang->execution->copyTeamTip = "select Project/{$lang->execution->common} to copy its members";
if($this->config->systemMode == 'classic') $lang->execution->copyTeamTip = "select Project/{$lang->executionCommon} to copy its members";
+1
View File
@@ -101,6 +101,7 @@ $lang->execution->copyNoExecution = 'There are no ' . $lang->executionCommon . '
$lang->execution->noTeam = 'No team members at the moment';
$lang->execution->or = ' or ';
$lang->execution->selectProject = 'Please select project';
$lang->execution->showMore = 'View closed executions';
if($this->config->systemMode == 'new') $lang->execution->copyTeamTip = "select Project/{$lang->execution->common} to copy its members";
if($this->config->systemMode == 'classic') $lang->execution->copyTeamTip = "select Project/{$lang->executionCommon} to copy its members";
+1
View File
@@ -100,6 +100,7 @@ $lang->execution->copyNoExecution = 'There are no ' . $lang->executionCommon . '
$lang->execution->noTeam = 'No team members at the moment';
$lang->execution->or = ' or ';
$lang->execution->selectProject = 'Please select project';
$lang->execution->showMore = 'View closed executions';
if($this->config->systemMode == 'new') $lang->execution->copyTeamTip = "select Project/{$lang->execution->common} to copy its members";
if($this->config->systemMode == 'classic') $lang->execution->copyTeamTip = "select Project/{$lang->executionCommon} to copy its members";
+2
View File
@@ -100,6 +100,8 @@ $lang->execution->recent = 'Recent visits: ';
$lang->execution->copyNoExecution = 'There are no ' . $lang->executionCommon . 'available to copy.';
$lang->execution->noTeam = 'No team members at the moment';
$lang->execution->or = ' or ';
$lang->execution->selectProject = 'Please select project';
$lang->execution->showMore = 'View closed executions';
if($this->config->systemMode == 'new') $lang->execution->copyTeamTip = "select Project/{$lang->execution->common} to copy its members";
if($this->config->systemMode == 'classic') $lang->execution->copyTeamTip = "select Project/{$lang->executionCommon} to copy its members";
+1
View File
@@ -101,6 +101,7 @@ $lang->execution->copyNoExecution = '没有可用的' . $lang->executionCommon .
$lang->execution->noTeam = '暂时没有团队成员';
$lang->execution->or = '或';
$lang->execution->selectProject = '请选择项目';
$lang->execution->showMore = '点击查看所有已关闭的执行';
if($this->config->systemMode == 'new') $lang->execution->copyTeamTip = "可以选择复制项目或{$lang->execution->common}团队的成员";
if($this->config->systemMode == 'classic') $lang->execution->copyTeamTip = "可以选择复制{$lang->executionCommon}团队的成员";
+1
View File
@@ -100,6 +100,7 @@ $lang->execution->recent = '近期訪問:';
$lang->execution->copyNoExecution = '沒有可用的' . $lang->executionCommon . '來複制';
$lang->execution->noTeam = '暫時沒有團隊成員';
$lang->execution->selectProject = '請選擇項目';
$lang->execution->showMore = '點擊查看所有已關閉的執行';
$lang->execution->start = "開始";
$lang->execution->activate = "激活";
+21 -26
View File
@@ -13,24 +13,23 @@
#tabContent {margin-top: 10px; z-index: 900;}
#tabContent ul {list-style: none; margin: 0}
#tabContent .tab-pane>ul {padding-left: 7px;}
#tabContent .tab-pane>ul>li.hide-in-search {position: relative;}
#tabContent .tab-pane>ul>li>label+a {padding-left: 45px;}
#tabContent .tab-pane>ul>li label {background: rgba(131,138,157,0.5); position: absolute; top: 0; left: 5px;}
#tabContent .tab-pane>ul>li.hide-in-search>div {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center;}
#tabContent .tab-pane>ul>li label {background: rgba(255,255,255,0.5); line-height: unset; color: #838a9d; border: 1px solid #d8d8d8; border-radius: 2px; padding: 1px 4px;}
#tabContent li a i.icon {font-size: 15px !important;}
#tabContent li a i.icon:before {min-width: 16px !important;}
#tabContent li .label {margin-top: 2px; position: unset;}
#tabContent li ul {padding-left: 15px;}
#tabContent li>a {margin-top: 5px;display: block; padding: 2px 10px 2px 5px; overflow: hidden; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px;}
#tabContent li .label {position: unset; margin-bottom: 0;}
#tabContent li>a, #tabContent li>div>a {display: block; padding: 2px 10px 2px 5px; overflow: hidden; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px;}
#tabContent li>a.selected {color: #e9f2fb; background-color: #0c64eb;}
#tabContent .tree li>.list-toggle {line-height: 24px;}
#tabContent .tree li.has-list.open:before {content: unset;}
#swapper li.hide-in-search>a:focus, #swapper li.hide-in-search>a:hover {color: #838a9d; cursor: default;}
#swapper li ul li a:focus, #swapper li ul li a:hover, .noProject li a:focus, .noProject li a:hover {background: #0c64eb; color: #fff;}
#swapper li.hide-in-search>div>a:focus, #swapper li.hide-in-search>div>a:hover {color: #838a9d; cursor: default;}
a.executionName:focus, a.executionName:hover {background: #0c64eb; color: #fff !important;}
</style>
<?php
$executionCounts = array();
$executionNames = array();
$myExecutionsHtml = '';
$normalExecutionsHtml = '';
$preFix = '';
$closedExecutionsHtml = '';
$tabActive = '';
$myExecutions = 0;
@@ -52,20 +51,19 @@ foreach($executions as $projectID => $projectExecutions)
}
$executionsPinYin = common::convert2Pinyin($executionNames);
$myExecutionsHtml = $config->systemMode == 'new' ? '<ul class="tree tree-angles" data-ride="tree">' : '<ul class="noProgram">';
$normalExecutionsHtml = $config->systemMode == 'new' ? '<ul class="tree tree-angles" data-ride="tree">' : '<ul class="noProgram">';
foreach($executions as $projectID => $projectExecutions)
{
/* Adapt to the old version. */
if($projectID and $config->systemMode == 'new')
{
$projectName = zget($projects, $projectID);
$preFix = $projectName . '/';
if($executionCounts[$projectID]['myExecution']) $myExecutionsHtml .= '<ul><li class="hide-in-search"><label class="label">' . $lang->project->common . '</label><a class="text-muted" title="' . $projectName . '">' . $projectName . '</a></li><li><ul>';
if($executionCounts[$projectID]['others']) $normalExecutionsHtml .= '<ul><li class="hide-in-search"><label class="label">' . $lang->project->common . '</label><a class="text-muted" title="' . $projectName . '">' . $projectName . '</a></li><li><ul>';
}
else
{
if($executionCounts[$projectID]['myExecution']) $myExecutionsHtml .= '<ul class="noProject">';
if($executionCounts[$projectID]['others']) $normalExecutionsHtml .= '<ul class="noProject">';
if($executionCounts[$projectID]['myExecution']) $myExecutionsHtml .= '<li class="hide-in-search"><div><a class="text-muted" title="' . $projectName . '">' . $projectName . '</a> <label class="label">' . $lang->project->common . '</label></div><ul>';
if($executionCounts[$projectID]['others']) $normalExecutionsHtml .= '<li class="hide-in-search"><div><a class="text-muted" title="' . $projectName . '">' . $projectName . '</a> <label class="label">' . $lang->project->common . '</label></div><ul>';
}
foreach($projectExecutions as $index => $execution)
@@ -73,7 +71,7 @@ foreach($executions as $projectID => $projectExecutions)
$selected = $execution->id == $executionID ? 'selected' : '';
if($execution->status != 'done' and $execution->status != 'closed' and ($execution->PM == $this->app->user->account or isset($execution->teams[$this->app->user->account])))
{
$myExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'") . '</li>';
$myExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected executionName' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'") . '</li>';
if($selected == 'selected') $tabActive = 'myExecution';
@@ -81,7 +79,7 @@ foreach($executions as $projectID => $projectExecutions)
}
else if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM != $this->app->user->account and !isset($execution->teams[$this->app->user->account]))
{
$normalExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'") . '</li>';
$normalExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected executionName' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'") . '</li>';
if($selected == 'selected') $tabActive = 'other';
@@ -89,7 +87,7 @@ foreach($executions as $projectID => $projectExecutions)
}
else if($execution->status == 'done' or $execution->status == 'closed')
{
$closedExecutionsHtml .= html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'");
$closedExecutionsHtml .= html::a(sprintf($link, $execution->id), $preFix . $execution->name, '', "class='$selected' title='" . $preFix . $execution->name . "' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'");
if($selected == 'selected') $tabActive = 'closed';
}
@@ -101,10 +99,9 @@ foreach($executions as $projectID => $projectExecutions)
if($executionCounts[$projectID]['others']) $normalExecutionsHtml .= '</ul></li>';
}
}
if($executionCounts[$projectID]['myExecution']) $myExecutionsHtml .= '</ul>';
if($executionCounts[$projectID]['others']) $normalExecutionsHtml .= '</ul>';
}
$myExecutionsHtml .= '</ul>';
$normalExecutionsHtml .= '</ul>';
?>
<div class="table-row">
<div class="table-col col-left">
@@ -144,10 +141,8 @@ $(function()
{
$(this).siblings().show();
$(this).parent().siblings('li').find('span').hide();
if($(this).attr('class') != 'active') $('#dropMenu').removeClass('show-right-col');
$("#dropMenu .search-box").width('auto');
})
if(config.clientLang == 'en') $('#tabContent .tab-pane>ul>li>label+a').css('padding-left', '55px');
$('#tabContent [data-ride="tree"]').tree('expand');
})
</script>
+1 -1
View File
@@ -95,8 +95,8 @@ td.hours {text-align: right; overflow: hidden; text-overflow: ellipsis; white-sp
<span class='project-type-label label label-outline <?php echo $execution->type == 'sprint' ? 'label-info' : 'label-warning';?>'><?php echo $lang->execution->typeList[$execution->type]?></span>
<?php endif;?>
<?php
if(isset($execution->delay)) echo "<span class='label label-danger label-badge'>{$lang->execution->delayed}</span> ";
echo !empty($execution->children) ? $execution->name : html::a($this->createLink('execution', 'task', 'execution=' . $execution->id), $execution->name);
if(isset($execution->delay)) echo "<span class='label label-danger label-badge'>{$lang->execution->delayed}</span> ";
?>
<?php if(!empty($execution->children)):?>
<a class="plan-toggle" data-id="<?php echo $execution->id;?>"><i class="icon icon-angle-double-right"></i></a>
+10 -3
View File
@@ -45,14 +45,21 @@
<div class="board s-<?php echo $colStatus?>">
<div>
<?php if(!empty($executionList[$colStatus])):?>
<?php foreach($executionList[$colStatus] as $execution):?>
<div class='board-item' <?php if($execution->status == 'doing' and isset($execution->delay)) echo "style='border-left: 3px solid red';";?>>
<?php foreach($executionList[$colStatus] as $executionID => $execution):?>
<div class='board-item' <?php if($colStatus == 'doing' and isset($execution->delay)) echo "style='border-left: 3px solid red';";?>>
<div class='table-row'>
<div class='table-col'>
<?php
if(common::hasPriv('execution', 'task'))
{
echo html::a($this->createLink('execution', 'task', "executionID=$execution->id"), $execution->name, '', "title='{$execution->name}'");
if($executionID == 'more')
{
echo html::a($this->createLink('execution', 'all', "status=closed&projectID=$projectID"), $execution, '', "title='$execution'");
}
else
{
echo html::a($this->createLink('execution', 'task', "executionID=$execution->id"), $execution->name, '', "title='{$execution->name}'");
}
}
else
{
+3 -2
View File
@@ -5,8 +5,8 @@ body {padding-left: 96px;}
#menuNav {position: absolute; top: 5px; bottom: 40px; width: 100%;}
#menu .nav > li {float: none; padding: 2px 8px;}
#menu .nav > li > a {color: #fff; line-height: 24px; padding: 6px; border-radius: 2px; white-space: nowrap; height: 36px;}
#menu .nav > li > a > .icon {display: inline-block; font-size: 16px;}
#menu .nav > li > a > .icon + .text {margin-left: 4px;}
#menu .nav > li > a > .icon {display: inline-block; font-size: 16px; position: relative; top: -1px}
#menu .nav > li > a > .icon + .text {margin-left: 4px; position: relative; top: -1px}
#menu .nav > li.active > a, #menu .nav > li > a:hover, #menu .nav > li > a:focus {background-color: #0c64eb;}
#menu .nav > li.divider {margin: 8px; background-color: #fff; opacity: 0.24; height: 1px; padding: 0 !important;}
#menuFooter {position: absolute; bottom: 0; left: 0; right: 0;}
@@ -21,6 +21,7 @@ body.menu-hide {padding-left: 0;}
.menu-hide #menuToggleItem {display: list-item;}
.menu-hide #menu .nav > li {padding: 2px 4px;}
.menu-hide #menu .nav > li > a {padding: 6px 4px; text-align: center;}
.menu-hide #menu .nav > li > a > .icon {top: 1px}
.menu-hide #menu .nav > li > a > .text {display: none;}
.menu-hide #menu .nav > li.has-avatar > a {padding: 2px 0;}
#menuMoreNav {display: none;}
+1 -1
View File
@@ -534,7 +534,7 @@
$(document).on('click', '.open-in-app,.show-in-app', function(e)
{
var $link = $(this);
if($link.is('[data-modal],[data-toggle!="tooltip"],.iframe,.not-in-app')) return;
if($link.is('[data-modal],[data-toggle][data-toggle!="tooltip"],.iframe,.not-in-app')) return;
var url = $link.hasClass('show-in-app') ? '' : ($link.attr('href') || $link.data('url'));
if(url && url.indexOf('onlybody=yes') > 0) return;
if(openApp(url, $link.data('app')))
+1 -1
View File
@@ -54,7 +54,7 @@ js::set('defaultOpen', $open);
<div id='menuFooter'>
<ul id="flodNav" class="nav">
<li id='menuToggleMenu'>
<a type='button' class='menu-toggle' data-collapse-text='<?php echo $lang->collapseMenu; ?>' data-unfold-text='<?php echo $lang->unfoldMenu; ?>'>
<a class='menu-toggle' data-collapse-text='<?php echo $lang->collapseMenu; ?>' data-unfold-text='<?php echo $lang->unfoldMenu; ?>'>
<i class='icon icon-sm icon-menu-collapse'></i>
</a>
</li>
+1 -1
View File
@@ -1019,7 +1019,7 @@ class my extends control
$this->view->programLink = isset($this->config->programLink) ? $this->config->programLink : 'program-browse';
$this->view->productLink = isset($this->config->productLink) ? $this->config->productLink : 'product-all';
$this->view->projectLink = isset($this->config->projectLink) ? $this->config->projectLink : 'project-browse';
$this->view->executionLink = isset($this->config->executionLink) ? $this->config->executionLink : 'execution-executionkanban';
$this->view->executionLink = isset($this->config->executionLink) ? $this->config->executionLink : 'execution-task';
$this->view->preferenceSetted = isset($this->config->preferenceSetted) ? true : false;
$this->display();
+1
View File
@@ -102,6 +102,7 @@ $lang->my->projectLinkList['project-index'] = 'By default, go to the most re
$lang->my->executionLinkList = array();
if($config->systemMode == 'new')
{
$lang->my->executionLinkList['execution-all'] = 'Enter the execution list by default, you can view all executions';
$lang->my->executionLinkList['execution-task'] = 'By default, enter the list of the most recently executed task, and you can view the task information under the current iteration';
$lang->my->executionLinkList['execution-executionkanban'] = 'By default, you can enter the execution Kanban to view the execution status of projects in progress';
}
+1
View File
@@ -109,6 +109,7 @@ $lang->my->projectLinkList['project-index'] = 'By default, go to the most re
$lang->my->executionLinkList = array();
if($config->systemMode == 'new')
{
$lang->my->executionLinkList['execution-all'] = 'Enter the execution list by default, you can view all executions';
$lang->my->executionLinkList['execution-task'] = 'By default, enter the list of the most recently executed task, and you can view the task information under the current iteration';
$lang->my->executionLinkList['execution-executionkanban'] = 'By default, you can enter the execution Kanban to view the execution status of projects in progress';
}
+1
View File
@@ -102,6 +102,7 @@ $lang->my->projectLinkList['project-index'] = 'By default, go to the most re
$lang->my->executionLinkList = array();
if($config->systemMode == 'new')
{
$lang->my->executionLinkList['execution-all'] = 'Enter the execution list by default, you can view all executions';
$lang->my->executionLinkList['execution-task'] = 'By default, enter the list of the most recently executed task, and you can view the task information under the current iteration';
$lang->my->executionLinkList['execution-executionkanban'] = 'By default, you can enter the execution Kanban to view the execution status of projects in progress';
}
+1
View File
@@ -102,6 +102,7 @@ $lang->my->projectLinkList['project-index'] = 'By default, go to the most re
$lang->my->executionLinkList = array();
if($config->systemMode == 'new')
{
$lang->my->executionLinkList['execution-all'] = 'Enter the execution list by default, you can view all executions';
$lang->my->executionLinkList['execution-task'] = 'By default, enter the list of the most recently executed task, and you can view the task information under the current iteration';
$lang->my->executionLinkList['execution-executionkanban'] = 'By default, you can enter the execution Kanban to view the execution status of projects in progress';
}
+1
View File
@@ -109,6 +109,7 @@ $lang->my->projectLinkList['project-index'] = '默认进入最近一个项
$lang->my->executionLinkList = array();
if($config->systemMode == 'new')
{
$lang->my->executionLinkList['execution-all'] = '默认进入执行列表,可以查看所有的执行';
$lang->my->executionLinkList['execution-task'] = '默认进入最近一个执行的任务列表,可以查看当前迭代下的任务信息';
$lang->my->executionLinkList['execution-executionkanban'] = '默认进入执行看板,可以查看进行中项目的执行情况';
}
+1
View File
@@ -109,6 +109,7 @@ $lang->my->projectLinkList['project-index'] = '預設進入最近一個項
$lang->my->executionLinkList = array();
if($config->systemMode == 'new')
{
$lang->my->executionLinkList['execution-all'] = '默認進入執行清單,可以查看所有的執行';
$lang->my->executionLinkList['execution-task'] = '預設進入最近一個執行的任務列表,可以查看當前迭代下的任務信息';
$lang->my->executionLinkList['execution-executionkanban'] = '默認進入執行看板,可以查看進行中項目的執行情况';
}
+21 -26
View File
@@ -14,24 +14,23 @@
#tabContent {margin-top: 10px; z-index: 900;}
#tabContent ul {list-style: none; margin: 0}
#tabContent .tab-pane>ul {padding-left: 7px;}
#tabContent .tab-pane>ul>li.hide-in-search {position: relative;}
#tabContent .tab-pane>ul>li>label+a {padding-left: 55px;}
#tabContent .tab-pane>ul>li label {background: rgba(131,138,157,0.5); position: absolute; top: 0; left: 5px;}
#tabContent .tab-pane>ul>li.hide-in-search>div {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center;}
#tabContent .tab-pane>ul>li label {background: rgba(255,255,255,0.5); line-height: unset; color: #838a9d; border: 1px solid #d8d8d8; border-radius: 2px; padding: 1px 4px;}
#tabContent li a i.icon {font-size: 15px !important;}
#tabContent li a i.icon:before {min-width: 16px !important;}
#tabContent li .label {margin-top: 2px; position: unset;}
#tabContent li ul {padding-left: 15px;}
#tabContent li>a {margin-top: 5px;display: block; padding: 2px 10px 2px 5px; overflow: hidden; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px;}
#tabContent li .label {position: unset; margin-bottom: 0;}
#tabContent li>a, #tabContent li>div>a {display: block; padding: 2px 10px 2px 5px; overflow: hidden; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px;}
#tabContent li>a.selected {color: #e9f2fb; background-color: #0c64eb;}
#tabContent .tree li>.list-toggle {line-height: 24px;}
#tabContent .tree li.has-list.open:before {content: unset;}
#swapper li.hide-in-search>a:focus, #swapper li.hide-in-search>a:hover {color: #838a9d; cursor: default;}
#swapper li ul li a:focus, #swapper li ul li a:hover, .noProgram li a:focus, .noProgram li a:hover {background: #0c64eb; color: #fff;}
#swapper li.hide-in-search>div>a:focus, #swapper li.hide-in-search>div>a:hover {color: #838a9d; cursor: default;}
a.productName:focus, a.productName:hover {background: #0c64eb; color: #fff !important;}
</style>
<?php
$productCounts = array();
$productNames = array();
$myProductsHtml = '';
$normalProductsHtml = '';
$preFix = '';
$closedProductsHtml = '';
$tabActive = '';
$myProducts = 0;
@@ -54,20 +53,19 @@ foreach($products as $programID => $programProducts)
}
$productsPinYin = common::convert2Pinyin($productNames);
$myProductsHtml = $config->systemMode == 'new' ? '<ul class="tree tree-angles" data-ride="tree">' : '<ul class="noProgram">';
$normalProductsHtml = $config->systemMode == 'new' ? '<ul class="tree tree-angles" data-ride="tree">' : '<ul class="noProgram">';
foreach($products as $programID => $programProducts)
{
/* Add the program name before project. */
if($programID and $config->systemMode == 'new')
{
$programName = zget($programs, $programID);
$preFix = $programName . '/';
if($productCounts[$programID]['myProduct']) $myProductsHtml .= '<ul><li class="hide-in-search"><label class="label">' . $lang->program->common . '</label> <a class="text-muted" title="' . $programName . '">' . $programName . '</a></li><li><ul>';
if($productCounts[$programID]['others']) $normalProductsHtml .= '<ul><li class="hide-in-search"><label class="label">' . $lang->program->common . '</label> <a class="text-muted" title="' . $programName . '">' . $programName . '</a></li><li><ul>';
}
else
{
if($productCounts[$programID]['myProduct']) $myProductsHtml .= '<ul class="noProgram">';
if($productCounts[$programID]['others']) $normalProductsHtml .= '<ul class="noProgram">';
if($productCounts[$programID]['myProduct']) $myProductsHtml .= '<li class="hide-in-search"><div><a class="text-muted" title="' . $programName . '">' . $programName . '</a> <label class="label">' . $lang->program->common . '</label></div><ul>';
if($productCounts[$programID]['others']) $normalProductsHtml .= '<li class="hide-in-search"><div><a class="text-muted" title="' . $programName . '">' . $programName . '</a> <label class="label">' . $lang->program->common . '</label></div><ul>';
}
foreach($programProducts as $index => $product)
@@ -78,7 +76,7 @@ foreach($products as $programID => $programProducts)
if($product->status == 'normal' and $product->PO == $this->app->user->account)
{
$myProductsHtml .= '<li>' . html::a($linkHtml, $productName, '', "class='$selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'") . '</li>';
$myProductsHtml .= '<li>' . html::a($linkHtml, $productName, '', "class='$selected productName' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'") . '</li>';
if($selected == 'selected') $tabActive = 'myProduct';
@@ -86,7 +84,7 @@ foreach($products as $programID => $programProducts)
}
else if($product->status == 'normal' and !($product->PO == $this->app->user->account))
{
$normalProductsHtml .= '<li>' . html::a($linkHtml, $productName, '', "class='$selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'") . '</li>';
$normalProductsHtml .= '<li>' . html::a($linkHtml, $productName, '', "class='$selected productName' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'") . '</li>';
if($selected == 'selected') $tabActive = 'other';
@@ -94,7 +92,7 @@ foreach($products as $programID => $programProducts)
}
else if($product->status == 'closed')
{
$closedProductsHtml .= html::a($linkHtml, $productName, '', "class='$selected' title='{$productName}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'");
$closedProductsHtml .= html::a($linkHtml, $preFix . $productName, '', "class='$selected' title='" . $preFix . $productName . "' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'");
if($selected == 'selected') $tabActive = 'closed';
}
@@ -106,10 +104,9 @@ foreach($products as $programID => $programProducts)
if($productCounts[$programID]['others']) $normalProductsHtml .= '</ul></li>';
}
}
if($productCounts[$programID]['myProduct']) $myProductsHtml .= '</ul>';
if($productCounts[$programID]['others']) $normalProductsHtml .= '</ul>';
}
$myProductsHtml .= '</ul>';
$normalProductsHtml .= '</ul>';
?>
<div class="table-row">
<div class="table-col col-left">
@@ -151,10 +148,8 @@ $(function()
{
$(this).siblings().show();
$(this).parent().siblings('li').find('span').hide();
if($(this).attr('class') != 'active') $('#dropMenu').removeClass('show-right-col');
$("#dropMenu .search-box").width('auto');
})
if(config.clientLang == 'en') $('#tabContent .tab-pane>ul>li>label+a').css('padding-left', '65px');
$('#tabContent [data-ride="tree"]').tree('expand');
})
</script>
+1
View File
@@ -1407,6 +1407,7 @@ class projectModel extends model
if($project->model === 'scrum') echo "<span class='project-type-label label label-outline label-info'>{$this->lang->project->scrum}</span> ";
}
echo html::a($projectLink, $project->name);
if(isset($project->delay)) echo "<span class='label label-danger label-badge'>{$this->lang->project->statusList['delay']}</span>";
break;
case 'PM':
$user = $this->loadModel('user')->getByID($project->PM, 'account');
+21 -26
View File
@@ -13,24 +13,23 @@
#tabContent {margin-top: 10px; z-index: 900;}
#tabContent ul {list-style: none; margin: 0}
#tabContent .tab-pane>ul {padding-left: 7px;}
#tabContent .tab-pane>ul>li.hide-in-search {position: relative;}
#tabContent .tab-pane>ul>li>label+a {padding-left: 55px;}
#tabContent .tab-pane>ul>li label {background: rgba(131,138,157,0.5); position: absolute; top: 0; left: 5px;}
#tabContent .tab-pane>ul>li.hide-in-search>div {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center;}
#tabContent .tab-pane>ul>li label {background: rgba(255,255,255,0.5); line-height: unset; color: #838a9d; border: 1px solid #d8d8d8; border-radius: 2px; padding: 1px 4px;}
#tabContent li a i.icon {font-size: 15px !important;}
#tabContent li a i.icon:before {min-width: 16px !important;}
#tabContent li .label {margin-top: 2px; position: unset;}
#tabContent li ul {padding-left: 15px;}
#tabContent li>a {margin-top: 5px;display: block; padding: 2px 10px 2px 5px; overflow: hidden; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px;}
#tabContent li .label {position: unset; margin-bottom: 0;}
#tabContent li>a, #tabContent li>div>a {display: block; padding: 2px 10px 2px 5px; overflow: hidden; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px;}
#tabContent li>a.selected {color: #e9f2fb; background-color: #0c64eb;}
#tabContent .tree li>.list-toggle {line-height: 24px;}
#tabContent .tree li.has-list.open:before {content: unset;}
#swapper li.hide-in-search>a:focus, #swapper li.hide-in-search>a:hover {color: #838a9d; cursor: default;}
#swapper li ul li a:focus, #swapper li ul li a:hover, .noProgram li a:focus, .noProgram li a:hover {background: #0c64eb; color: #fff;}
#swapper li.hide-in-search>div>a:focus, #swapper li.hide-in-search>div>a:hover {color: #838a9d; cursor: default;}
a.projectName:focus, a.projectName:hover {background: #0c64eb; color: #fff !important;}
</style>
<?php
$projectCounts = array();
$projectNames = array();
$myProjectsHtml = '';
$normalProjectsHtml = '';
$preFix = '';
$closedProjectsHtml = '';
$tabActive = '';
$myProjects = 0;
@@ -52,20 +51,19 @@ foreach($projects as $programID => $programProjects)
}
$projectsPinYin = common::convert2Pinyin($projectNames);
$myProjectsHtml = $config->systemMode == 'new' ? '<ul class="tree tree-angles" data-ride="tree">' : '<ul class="noProgram">';
$normalProjectsHtml = $config->systemMode == 'new' ? '<ul class="tree tree-angles" data-ride="tree">' : '<ul class="noProgram">';
foreach($projects as $programID => $programProjects)
{
/* Add the program name before project. */
if(isset($programs[$programID]) and $config->systemMode == 'new')
{
$programName = zget($programs, $programID);
$preFix = $programName . '/';
if($projectCounts[$programID]['myProject']) $myProjectsHtml .= '<ul><li class="hide-in-search"><label class="label">' . $lang->program->common . '</label> <a class="text-muted" title="' . $programName . '">' . $programName . '</a></li><li><ul>';
if($projectCounts[$programID]['others']) $normalProjectsHtml .= '<ul><li class="hide-in-search"><label class="label">' . $lang->program->common . '</label> <a class="text-muted" title="' . $programName . '">' . $programName . '</a></li><li><ul>';
}
else
{
if($projectCounts[$programID]['myProject']) $myProjectsHtml .= '<ul class="noProgram">';
if($projectCounts[$programID]['others']) $normalProjectsHtml .= '<ul class="noProgram">';
if($projectCounts[$programID]['myProject']) $myProjectsHtml .= '<li class="hide-in-search"><div><a class="text-muted" title="' . $programName . '">' . $programName . '</a> <label class="label">' . $lang->program->common . '</label></div><ul>';
if($projectCounts[$programID]['others']) $normalProjectsHtml .= '<li class="hide-in-search"><div><a class="text-muted" title="' . $programName . '">' . $programName . '</a> <label class="label">' . $lang->program->common . '</label></div><ul>';
}
foreach($programProjects as $index => $project)
@@ -79,7 +77,7 @@ foreach($projects as $programID => $programProjects)
if($project->status != 'done' and $project->status != 'closed' and $project->PM == $this->app->user->account)
{
$myProjectsHtml .= '<li>' . html::a(sprintf($link, $project->id), $projectName, '', "class='$selected' title='{$project->name}' data-key='" . zget($projectsPinYin, $project->name, '') . "'") . '</li>';
$myProjectsHtml .= '<li>' . html::a(sprintf($link, $project->id), $projectName, '', "class='$selected projectName' title='{$project->name}' data-key='" . zget($projectsPinYin, $project->name, '') . "'") . '</li>';
if($selected == 'selected') $tabActive = 'myProject';
@@ -87,7 +85,7 @@ foreach($projects as $programID => $programProjects)
}
else if($project->status != 'done' and $project->status != 'closed' and !($project->PM == $this->app->user->account))
{
$normalProjectsHtml .= '<li>' . html::a(sprintf($link, $project->id), $projectName, '', "class='$selected' title='{$project->name}' data-key='" . zget($projectsPinYin, $project->name, '') . "'") . '</li>';
$normalProjectsHtml .= '<li>' . html::a(sprintf($link, $project->id), $projectName, '', "class='$selected projectName' title='{$project->name}' data-key='" . zget($projectsPinYin, $project->name, '') . "'") . '</li>';
if($selected == 'selected') $tabActive = 'other';
@@ -95,7 +93,7 @@ foreach($projects as $programID => $programProjects)
}
else if($project->status == 'done' or $project->status == 'closed')
{
$closedProjectsHtml .= html::a(sprintf($link, $project->id), $project->name, '', "class='$selected' title='{$project->name}' data-key='" . zget($projectsPinYin, $project->name, '') . "'");
$closedProjectsHtml .= html::a(sprintf($link, $project->id), $preFix . $project->name, '', "class='$selected' title='" . $preFix . $project->name . "' data-key='" . zget($projectsPinYin, $project->name, '') . "'");
if($selected == 'selected') $tabActive = 'closed';
}
@@ -107,10 +105,9 @@ foreach($projects as $programID => $programProjects)
if($projectCounts[$programID]['others']) $normalProjectsHtml .= '</ul></li>';
}
}
if($projectCounts[$programID]['myProject']) $myProjectsHtml .= '</ul>';
if($projectCounts[$programID]['others']) $normalProjectsHtml .= '</ul>';
}
$myProjectsHtml .= '</ul>';
$normalProjectsHtml .= '</ul>';
?>
<div class="table-row">
@@ -152,10 +149,8 @@ $(function()
{
$(this).siblings().show();
$(this).parent().siblings('li').find('span').hide();
if($(this).attr('class') != 'active') $('#dropMenu').removeClass('show-right-col');
$("#dropMenu .search-box").width('auto');
})
if(config.clientLang == 'en') $('#tabContent .tab-pane>ul>li>label+a').css('padding-left', '65px');
$('#tabContent [data-ride="tree"]').tree('expand');
})
</script>
+15 -5
View File
@@ -13,6 +13,7 @@
<style>
#cards {margin: 0 0;}
#cards > .col {width: 25%;}
@media screen and (max-width: 1500px) {#cards > .col {width: 33.3333333%;}}
#cards .panel {margin: 10px 0; border: 1px solid #DCDCDC; border-radius: 4px; box-shadow: none; cursor: pointer; height: 190px;}
#cards .pager .btn {padding-top: 4px;}
#cards .panel:hover {border-color: #006AF1; box-shadow: 0 0 10px 0 rgba(0,0,100,.25);}
@@ -139,20 +140,29 @@
</div>
<div class='project-footer table-row'>
<?php $titleClass = ($project->teamCount == 0 and !$canActions) ? 'teamTitle' : '';?>
<?php $count = 0;?>
<div class="<?php echo $titleClass?>"><?php echo $lang->project->teamMember;?></div>
<?php if(!empty($project->teamMembers)):?>
<div class='project-members table-col'>
<?php foreach($project->teamMembers as $key => $member):?>
<?php if($key > 2) continue;?>
<a href='<?php echo helper::createLink('project', 'team', "projectID=$projectID");?>' title="<?php echo $users[$member];?>">
<?php foreach($project->teamMembers as $member):?>
<?php
if($count > 2) continue;
if(!isset($users[$member]))
{
$project->teamCount -= 1;
continue;
}
?>
<?php $count += 1;?>
<a href='<?php echo helper::createLink('project', 'team', "projectID=$projectID");?>' title="<?php echo $users[$member];?>">
<div class="avatar bg-secondary avatar-circle avatar-<?php echo $member;?>">
<?php echo !empty($usersAvatar[$member]) ? html::image(zget($usersAvatar, $member)) : strtoupper($member[0]);?>
</div>
</a>
<?php endforeach;?>
<?php if($project->teamCount > 3):?>
<?php echo '...';?>
<a href='<?php echo helper::createLink('project', 'team', "projectID=$projectID");?>' title="<?php echo $users[$member];?>">
<?php echo '...';?>
<a href='<?php echo helper::createLink('project', 'team', "projectID=$projectID");?>' title="<?php echo $users[$member];?>">
<div class="avatar bg-secondary avatar-circle avatar-<?php echo $member;?>">
<?php echo !empty($usersAvatar[end($project->teamMembers)]) ? html::image(zget($usersAvatar, end($project->teamMembers))) : strtoupper($member[0]);?>
</div>
+1
View File
@@ -131,6 +131,7 @@
$teamAccounts = array_keys($task->team);
foreach($teamAccounts as $teamAccount)
{
if(!isset($members[$teamAccount])) continue;
$taskMembers[$teamAccount] = $members[$teamAccount];
}
}
+24
View File
@@ -700,6 +700,7 @@ class upgradeModel extends model
$this->saveLogs('Execute 15_3');
$this->execSQL($this->getUpgradeFile('15.3'));
$this->processTesttaskDate();
$this->processDocTempContent();
$this->appendExec('15_3');
}
@@ -5228,4 +5229,27 @@ class upgradeModel extends model
return true;
}
/**
* Store the body of the document in a temporary field.
*
* @access public
* @return bool
*/
public function processDocTempContent()
{
$docContentList = $this->dao->select('doc,content')->from(TABLE_DOCCONTENT)->fetchAll('doc');
foreach($docContentList as $docID => $doc)
{
if(empty($doc->content)) continue;
$this->dao->update(TABLE_DOC)
->set('tempContent')->eq($doc->content)
->where('id')->eq($docID)
->exec();
}
return true;
}
}