diff --git a/api/v1/entries/bugs.php b/api/v1/entries/bugs.php index e07502a219..c67a444682 100644 --- a/api/v1/entries/bugs.php +++ b/api/v1/entries/bugs.php @@ -86,6 +86,17 @@ class bugsEntry extends entry $fields = 'title,project,execution,openedBuild,assignedTo,pri,module,severity,type,story,task,mailto,keywords,steps,uid'; $this->batchSetPost($fields); + $caseID = $this->request('case', 0); + if($caseID) + { + $case = $this->loadModel('testcase')->getById($caseID); + if($case) + { + $this->setPost('case', $case->id); + $this->setPost('caseVersion', $case->version); + } + } + $this->setPost('product', $productID); $this->setPost('notifyEmail', implode(',', $this->request('notifyEmail', array()))); diff --git a/db/update17.1.sql b/db/update17.1.sql index 3dd2460bfc..15d43d1d73 100644 --- a/db/update17.1.sql +++ b/db/update17.1.sql @@ -18,3 +18,4 @@ ALTER TABLE `zt_kanban` ADD `showWIP` enum('0','1') NOT NULL DEFAULT '1' AFTER ` ALTER TABLE `zt_kanban` ADD `alignment` varchar(10) NOT NULL DEFAULT 'center' AFTER `object`; ALTER TABLE `zt_module` ADD `from` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `type`; +ALTER TABLE `zt_workflow` ADD `approval` enum('enabled', 'disabled') NOT NULL DEFAULT 'disabled' AFTER `status`; \ No newline at end of file diff --git a/extension/lite/block/ext/view/welcome.html.php b/extension/lite/block/ext/view/welcome.html.php index 172e5999ee..3e1a701a4c 100644 --- a/extension/lite/block/ext/view/welcome.html.php +++ b/extension/lite/block/ext/view/welcome.html.php @@ -11,8 +11,8 @@ */ ?> @@ -208,6 +200,11 @@ $(function() batchAddModalTrigger.show({url: $(this).attr('href'), showHeader:false}); return false; }) + + $('.pull-left .btn-link').click(function() + { + $(this).css('background', 'unset'); + }) }); getModuleRoot() . 'common/view/footer.html.php';?> diff --git a/extension/lite/todo/ext/view/calendar.html.php b/extension/lite/todo/ext/view/calendar.html.php index 7509b6fb3b..fd16b01832 100644 --- a/extension/lite/todo/ext/view/calendar.html.php +++ b/extension/lite/todo/ext/view/calendar.html.php @@ -25,12 +25,15 @@ todo->moduleList);?> @@ -424,6 +416,11 @@ $(function() return false; }) + $('.pull-left .btn-link').click(function() + { + $(this).css('background', 'unset'); + }) + addPager('#tab_undone'); addPager('#tab_future'); addPager('#tab_task'); diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index 1caa64a417..4c18838dfb 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -1225,7 +1225,11 @@ EOT; } /* Fix value is '0123' error. */ - if(is_array($value) or is_object($value) or is_string($value)) + if(is_numeric($value) and !preg_match('/^0[1-9]/', $value)) + { + $js .= "{$prefix}{$key} = {$value};"; + } + elseif(is_array($value) or is_object($value) or is_string($value)) { /* Fix for auto-complete when user is number.*/ if(is_array($value) or is_object($value)) @@ -1240,10 +1244,6 @@ EOT; $value = json_encode($value); $js .= "{$prefix}{$key} = {$value};"; } - elseif(is_numeric($value)) - { - $js .= "{$prefix}{$key} = {$value};"; - } elseif(is_bool($value)) { $value = $value ? 'true' : 'false'; diff --git a/module/admin/view/checkweak.html.php b/module/admin/view/checkweak.html.php index d4005dd4ae..984e7aa7fa 100644 --- a/module/admin/view/checkweak.html.php +++ b/module/admin/view/checkweak.html.php @@ -18,7 +18,7 @@ createLink('admin', 'safe'), $lang->admin->safe->set); echo html::a($this->createLink('admin', 'checkWeak'), $lang->admin->safe->checkWeak, '', "class='active'"); - echo html::a($this->createLink('admin', 'resetPWDSetting'), $lang->admin->resetPWDSetting); + if(common::hasPriv('admin', 'resetPWDSetting')) echo html::a($this->createLink('admin', 'resetPWDSetting'), $lang->admin->resetPWDSetting); ?> diff --git a/module/admin/view/resetpwdsetting.html.php b/module/admin/view/resetpwdsetting.html.php index ce7eb08e3b..1ff56e9a65 100644 --- a/module/admin/view/resetpwdsetting.html.php +++ b/module/admin/view/resetpwdsetting.html.php @@ -25,7 +25,7 @@
createLink('admin', 'safe'), $lang->admin->safe->set); - echo html::a($this->createLink('admin', 'checkWeak'), $lang->admin->safe->checkWeak); + if(common::hasPriv('admin', 'checkWeak')) echo html::a($this->createLink('admin', 'checkWeak'), $lang->admin->safe->checkWeak); echo html::a($this->createLink('admin', 'resetPWDSetting'), $lang->admin->resetPWDSetting, '', "class='active'"); ?>
diff --git a/module/admin/view/safe.html.php b/module/admin/view/safe.html.php index 785ac9e075..5e8370764d 100644 --- a/module/admin/view/safe.html.php +++ b/module/admin/view/safe.html.php @@ -23,8 +23,8 @@
createLink('admin', 'safe'), $lang->admin->safe->set, '', "class='active'"); - echo html::a($this->createLink('admin', 'checkWeak'), $lang->admin->safe->checkWeak); - echo html::a($this->createLink('admin', 'resetPWDSetting'), $lang->admin->resetPWDSetting); + if(common::hasPriv('admin', 'checkWeak')) echo html::a($this->createLink('admin', 'checkWeak'), $lang->admin->safe->checkWeak); + if(common::hasPriv('admin', 'resetPWDSetting')) echo html::a($this->createLink('admin', 'resetPWDSetting'), $lang->admin->resetPWDSetting); ?>
diff --git a/module/bug/control.php b/module/bug/control.php index 1d353355ac..2e11fc511c 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -553,14 +553,10 @@ class bug extends control $moduleOwner = $this->bug->getModuleOwner($moduleID, $productID); - /* Set team members of the latest execution as assignedTo list. */ - $productMembers = $this->bug->getProductMemberPairs($productID); + /* Get all project team members linked with this product. */ + $productMembers = $this->bug->getProductMemberPairs($productID, $branch); + $productMembers = array_filter($productMembers); if(empty($productMembers)) $productMembers = $this->view->users; - if($assignedTo and !isset($productMembers[$assignedTo])) - { - $user = $this->loadModel('user')->getById($assignedTo); - if($user) $productMembers[$assignedTo] = $user->realname; - } $moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, ($branch === 'all' or !isset($branches[$branch])) ? 0 : $branch); if(empty($moduleOptionMenu)) return print(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story"))); @@ -577,7 +573,7 @@ class bug extends control if($projectID) { $project = $this->loadModel('project')->getByID($projectID); - if(empty($bugID) or $this->app->tab != 'qa') $projects = array($projectID => $project->name); + if(empty($bugID) or $this->app->tab != 'qa') $projects += array($projectID => $project->name); } } elseif($projectID) @@ -1090,6 +1086,22 @@ class bug extends control $moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $bug->branch); if(!isset($moduleOptionMenu[$bug->module])) $moduleOptionMenu += $this->tree->getModulesName($bug->module); + /* Get assigned to member. */ + if($bug->execution) + { + $assignedToList = $this->user->getTeamMemberPairs($bug->execution, 'execution'); + } + elseif($bug->project) + { + $assignedToList = $this->loadModel('project')->getTeamMemberPairs($bug->project); + } + else + { + $assignedToList = $this->bug->getProductMemberPairs($bug->product, $bug->branch); + $assignedToList = array_filter($assignedToList); + if(empty($assignedToList)) $assignedToList = $this->user->getPairs('devfirst|noclosed'); + } + $this->view->bug = $bug; $this->view->productID = $productID; $this->view->product = $product; @@ -1105,6 +1117,7 @@ class bug extends control $this->view->tasks = $this->task->getExecutionTaskPairs($bug->execution); $this->view->testtasks = $this->loadModel('testtask')->getPairs($bug->product, $bug->execution, $bug->testtask); $this->view->users = $this->user->getPairs('', "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy,$bug->openedBy"); + $this->view->assignedToList = $assignedToList; $this->view->openedBuilds = $openedBuilds; $this->view->resolvedBuilds = array('' => '') + $openedBuilds + $oldResolvedBuild; $this->view->actions = $this->action->getList('bug', $bugID); @@ -1234,35 +1247,94 @@ class bug extends control $this->view->customFields = $customFields; $this->view->showFields = $this->config->bug->custom->batchEditFields; - /* Set users. */ - $appendUsers = array(); + $branchIdList = array(); + $projectIdList = array(); + $executionIdList = array(); foreach($bugs as $bug) { - $appendUsers[$bug->assignedTo] = $bug->assignedTo; - $appendUsers[$bug->resolvedBy] = $bug->resolvedBy; + $projectIdList[$bug->project] = $bug->project; + $executionIdList[$bug->execution] = $bug->execution; + + $branchIdList[$bug->product][$bug->branch] = $bug->branch; if(!isset($modules[$bug->product][$bug->branch])) $modules[$bug->product][$bug->branch] = $modules[$bug->product][0] + $this->tree->getModulesName($bug->module); } - $users = $this->user->getPairs('devfirst', $appendUsers, $this->config->maxCount); + + /* Get assigned to member. */ + $this->loadModel('project'); + $this->loadModel('execution'); + + $productMembers = array(); + $projectMembers = array(); + $executionMembers = array(); + if($productID) + { + $branchList = zget($branchIdList, $productID, array()); + foreach($branchList as $branchID) + { + $members = $this->bug->getProductMemberPairs($productID, $branchID); + $productMembers[$productID][$branchID] = array_filter($members); + } + } + else + { + foreach($productIdList as $id) + { + $branchList = zget($branchIdList, $id, array()); + foreach($branchList as $branchID) + { + $members = $this->bug->getProductMemberPairs($id, $branchID); + $productMembers[$id][$branchID] = array_filter($members); + } + } + } + + $projectMemberGroup = $this->project->getTeamMemberGroup($projectIdList); + $projectMembers = array(); + foreach($projectIdList as $projectID) + { + $projectTeam = zget($projectMemberGroup, $projectID, array()); + if(empty($projectTeam)) $projectMembers[$projectID] = array(); + foreach($projectTeam as $user) + { + $projectMembers[$projectID][$user->account] = $user->realname; + } + } + + $executionMemberGroup = $this->execution->getMembersByIdList($executionIdList); + $executionMembers = array(); + foreach($executionIdList as $executionID) + { + $executionTeam = zget($executionMemberGroup, $executionID, array()); + if(empty($executionTeam)) $executionMemberGroup[$executionID] = array(); + foreach($executionTeam as $user) + { + $executionMembers[$executionID][$user->account] = $user->realname; + } + } + + /* Set users. */ + $users = $this->user->getPairs('devfirst', '', $this->config->maxCount); $users = array('' => '', 'ditto' => $this->lang->bug->ditto) + $users; /* Assign. */ - $this->view->position[] = $this->lang->bug->common; - $this->view->position[] = $this->lang->bug->batchEdit; - $this->view->productID = $productID; - $this->view->branchProduct = $branchProduct; - $this->view->severityList = array('ditto' => $this->lang->bug->ditto) + $this->lang->bug->severityList; - $this->view->typeList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->typeList; - $this->view->priList = array('0' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->priList; - $this->view->resolutionList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->resolutionList; - $this->view->statusList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->statusList; - $this->view->osList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->osList; - $this->view->browserList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->browserList; - $this->view->bugs = $bugs; - $this->view->branch = $branch; - $this->view->users = $users; - $this->view->modules = $modules; - $this->view->branchTagOption = $branchTagOption; + $this->view->productID = $productID; + $this->view->branchProduct = $branchProduct; + $this->view->severityList = array('ditto' => $this->lang->bug->ditto) + $this->lang->bug->severityList; + $this->view->typeList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->typeList; + $this->view->priList = array('0' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->priList; + $this->view->resolutionList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->resolutionList; + $this->view->statusList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->statusList; + $this->view->osList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->osList; + $this->view->browserList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->browserList; + $this->view->bugs = $bugs; + $this->view->branch = $branch; + $this->view->users = $users; + $this->view->productMembers = $productMembers; + $this->view->projectMembers = $projectMembers; + $this->view->executionMembers = $executionMembers; + $this->view->modules = $modules; + $this->view->branchTagOption = $branchTagOption; $this->display(); } @@ -1320,17 +1392,20 @@ class bug extends control } } - if($this->app->tab == 'project') + /* Get assigned to member. */ + if($bug->execution) { - $users = $this->user->getTeamMemberPairs($bug->project, 'project', 'nodeleted', $bug->assignedTo); + $users = $this->user->getTeamMemberPairs($bug->execution, 'execution'); } - elseif($this->app->tab == 'execution') + elseif($bug->project) { - $users = $this->user->getTeamMemberPairs($bug->execution, 'execution', 'nodeleted', $bug->assignedTo); + $users = $this->loadModel('project')->getTeamMemberPairs($bug->project); } else { - $users = $this->user->getPairs('noclosed', $bug->assignedTo); + $users = $this->bug->getProductMemberPairs($bug->product, $bug->branch); + $users = array_filter($users); + if(empty($users)) $users = $this->user->getPairs('devfirst|noclosed'); } $this->view->title = $this->products[$bug->product] . $this->lang->colon . $this->lang->bug->assignedTo; @@ -2029,7 +2104,7 @@ class bug extends control */ public function ajaxLoadAssignedTo($executionID, $selectedUser = '') { - $executionMembers = $this->user->getTeamMemberPairs($executionID, 'execution', '', $selectedUser); + $executionMembers = $this->user->getTeamMemberPairs($executionID, 'execution'); $execution = $this->loadModel('execution')->getByID($executionID); if(empty($selectedUser)) $selectedUser = $execution->QD; @@ -2351,12 +2426,15 @@ class bug extends control * * @param int $productID * @param string $selectedUser + * @param int $branchID * @access public * @return string */ - public function ajaxGetProductMembers($productID, $selectedUser = '') + public function ajaxGetProductMembers($productID, $selectedUser = '', $branchID = '') { - $productMembers = $this->bug->getProductMemberPairs($productID); + $productMembers = $this->bug->getProductMemberPairs($productID, $branchID); + $productMembers = array_filter($productMembers); + if(empty($productMembers)) $productMembers = $this->loadModel('user')->getPairs('devfirst|noclosed'); return print(html::select('assignedTo', $productMembers, $selectedUser, 'class="form-control"')); } @@ -2365,7 +2443,7 @@ class bug extends control * Ajax get project team members. * * @param int $projectID - * @param string $$selectedUser + * @param string $selectedUser * @access public * @return string */ diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 8410c771b3..166e71d0d1 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -130,6 +130,7 @@ function loadBranch() loadProductBuilds(productID); loadProductplans(productID); loadProductStories(productID); + loadProductMembers(productID); } /** @@ -333,12 +334,44 @@ function loadProductExecutions(productID, projectID = 0) $(this).find('select').chosen(); if(typeof(bugExecution) == 'string' && systemMode != 'classic') $('#executionIdBox').prepend("" + bugExecution + ""); if(required) $(this).find('#execution_chosen').addClass('required'); - if(page != 'edit') changeAssignedTo(projectID); + changeAssignedTo(projectID); }); projectID != 0 ? loadProjectBuilds(projectID) : loadProductBuilds(productID); } +/** + * Ajax change execution name. + * + * @param int $projectID + * @access public + * @return void + */ +function changeAssignedTo(projectID) +{ + if(parseInt(projectID)) + { + loadProjectTeamMembers(projectID); + if(page == 'create') + { + var link = createLink('bug', 'ajaxGetExecutionLang', 'projectID=' + projectID); + $.post(link, function(executionLang) + { + $('#executionBox').html(executionLang); + }) + } + } + else if($('#execution').val() != 0) + { + loadAssignedTo($('#execution').val()); + } + else + { + var productID = $('#product').val(); + loadProductMembers(productID); + } +} + /** * Load executions of product and project. * @@ -441,13 +474,13 @@ function loadExecutionRelated(executionID) } else { - var currentProjectID = $('#project').val(); + var currentProjectID = $('#project').val() == 'undefined' ? 0 : $('#project').val(); var currentProductID = $('#product').val(); $('#taskIdBox').innerHTML = ''; // Reset the task. loadProductStories(currentProductID); loadTestTasks(currentProductID); - if(typeof(currentProjectID) == 'undefined') + if(currentProjectID == 0) { loadProductMembers(currentProductID); } @@ -593,7 +626,8 @@ function loadExecutionBuilds(executionID, num) */ function loadProductMembers(productID) { - link = createLink('bug', 'ajaxGetProductMembers', 'productID=' + productID + '&selectedUser=' + $('#assignedTo').val()); + var branchID = $('#branch').val() == undefined ? '' : $('#branch').val(); + var link = createLink('bug', 'ajaxGetProductMembers', 'productID=' + productID + '&selectedUser=' + $('#assignedTo').val() + '&branchID=' + branchID); $.get(link, function(data) { if(!data) data = ''; @@ -678,6 +712,7 @@ function loadProductBranches(productID, param) loadProductProjects(productID); loadProductplans(productID); loadProductStories(productID); + loadProductMembers(productID); }) } diff --git a/module/bug/js/create.js b/module/bug/js/create.js index 68d406da31..b804a98e40 100644 --- a/module/bug/js/create.js +++ b/module/bug/js/create.js @@ -125,34 +125,6 @@ $(function() }); }); -/** - * Ajax change execution name. - * - * @param int $projectID - * @access public - * @return void - */ -function changeAssignedTo(projectID) -{ - if(parseInt(projectID)) - { - loadProjectTeamMembers(projectID); - var link = createLink('bug', 'ajaxGetExecutionLang', 'projectID=' + projectID); - $.post(link, function(executionLang) - { - $('#executionBox').html(executionLang); - }) - } - else if($('#execution').val() != 0) - { - loadAssignedTo($('#execution').val()); - } - else - { - setAssignedTo(); - } -} - $(window).unload(function(){ if(blockID) window.parent.refreshBlock($('#block' + blockID)); }); diff --git a/module/bug/model.php b/module/bug/model.php index ef747cb7ef..236f66bef3 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -460,6 +460,8 @@ class bugModel extends model echo(js::alert($this->lang->bug->executionAccessDenied)); $loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login"; if(strpos($this->server->http_referer, $loginLink) !== false) return print(js::locate(helper::createLink('bug', 'index', ''))); + if($this->app->tab == 'my') print(js::reload('parent')); + return print(js::locate('back')); } } @@ -1898,14 +1900,15 @@ class bugModel extends model * get Product member pairs. * * @param int $productID + * @param int $branchID * @access public * @return void */ - public function getProductMemberPairs($productID) + public function getProductMemberPairs($productID, $branchID = '') { if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembersPairs(); - $projects = $this->loadModel('product')->getProjectPairsByProduct($productID); + $projects = $this->loadModel('product')->getProjectPairsByProduct($productID, $branchID); $users = $this->dao->select("t2.id, t2.account, t2.realname")->from(TABLE_TEAM)->alias('t1') ->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account') diff --git a/module/bug/view/batchedit.html.php b/module/bug/view/batchedit.html.php index 5a7252c532..c15db2a9b3 100644 --- a/module/bug/view/batchedit.html.php +++ b/module/bug/view/batchedit.html.php @@ -102,7 +102,27 @@ product][$bug->branch]) ? $modules[$bug->product][$bug->branch] : array(0 => '/'), $bug->module, "class='form-control picker-select' data-drop-width='auto'");?> ' style='overflow:visible'>plan, "class='form-control picker-select' data-drop-width='auto'");?> - ' style='overflow:visible'>assignedTo, "class='form-control picker-select' data-drop-width='auto'");?> + execution) + { + $assignedToList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $executionMembers[$bug->execution]; + } + elseif($bug->project) + { + $assignedToList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $projectMembers[$bug->project]; + } + else + { + $assignedToList = $productMembers[$bug->product][$bug->branch]; + if(empty($assignedToList)) + { + $assignedToList = $users; + unset($assignedToList['closed']); + } + } + ?> + ' style='overflow:visible'>assignedTo, "class='form-control picker-select' data-drop-width='135px'");?> ' style='overflow:visible'>deadline, "class='form-control form-date'");?> >os, 'class=form-control');?> >browser, 'class=form-control');?> diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 1088484bd1..a6c5bae27a 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -490,6 +490,9 @@ $(function(){$('#bugForm').table();}) qa->homepage) and $config->qa->homepage != 'browse' and $config->global->flow == 'full'):?> $(function(){$('#modulemenu .nav li:last').after("
  • homepage?>
  • ")}); + +$('#bugForm .table-footer .table-actions #assignedTo').closest('.btn-group.dropup').removeClass('dropup').addClass('dropdown'); + function handleLinkButtonClick() { var xxcUrl = "xxc:openInApp/zentao-integrated/" + encodeURIComponent(window.location.href.replace(/.display=card/, '').replace(/\.xhtml/, '.html')); diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php index 61d52d2fec..4d986c8e82 100644 --- a/module/bug/view/edit.html.php +++ b/module/bug/view/edit.html.php @@ -153,7 +153,7 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project); bug->assignedTo;?>
    - assignedTo, "class='form-control chosen'");?> + assignedTo, "class='form-control chosen'");?> bug->allUsers, "class='btn btn-default' onclick='loadAllUsers()' data-toggle='tooltip'");?>
    diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index 8cf2726cdc..2a41f7d2ab 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -114,7 +114,7 @@ tbody tr td:first-child input {display: none;} } else { - echo '' . $story->title . ''; + echo $story->title; } ?> diff --git a/module/common/lang/de.php b/module/common/lang/de.php index 4190c3de83..14e01b3443 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -81,6 +81,7 @@ $lang->retrack = 'Retrack'; $lang->whitelist = 'Weiße Liste'; $lang->globalSetting = 'Global Setting'; $lang->waterfallModel = 'Waterfall'; +$lang->scrumModel = 'Scrum'; $lang->all = 'All'; $lang->viewDetails = 'View Details'; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index e9841226ad..4899f0f9b4 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -81,6 +81,7 @@ $lang->retrack = 'Retrack'; $lang->whitelist = 'Access whitelist'; $lang->globalSetting = 'Global Setting'; $lang->waterfallModel = 'Waterfall'; +$lang->scrumModel = 'Scrum'; $lang->all = 'All'; $lang->viewDetails = 'View Details'; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index 9e8baeb568..246b1300a2 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -81,6 +81,7 @@ $lang->retrack = 'Réduire'; $lang->whitelist = 'Liste blanche'; $lang->globalSetting = 'Global Setting'; $lang->waterfallModel = 'Waterfall'; +$lang->scrumModel = 'Scrum'; $lang->all = 'All'; $lang->viewDetails = 'View Details'; diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index fb4918be49..78d0cbc750 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -491,6 +491,9 @@ $lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|i $lang->admin->menu->model['dropMenu'] = new stdclass(); $lang->admin->menu->model['dropMenu']->allModel = array('link' => "{$lang->globalSetting}|custom|browsestoryconcept|", 'subModule' => 'measurement,report,sqlbuilder,subject,custom,meetingroom,baseline'); + +if($config->edition == 'max') $lang->admin->menu->model['dropMenu']->scrum = array('link' => "{$lang->scrumModel}|auditcl|scrumbrowse|processID=0&browseType=scrum", 'subModule' => 'auditcl,process,activity,zoutput,classify,'); + if($config->systemMode == 'new') { $lang->admin->menu->model['dropMenu']->waterfall = array('link' => "{$lang->waterfallModel}|stage|setType|", 'subModule' => 'stage,auditcl,cmcl,process,activity,zoutput,classify,reviewcl,reviewsetting'); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 4e226de9e7..3636cacd86 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -81,6 +81,7 @@ $lang->retrack = '收起'; $lang->whitelist = '访问白名单'; $lang->globalSetting = '全局设置'; $lang->waterfallModel = '瀑布模型'; +$lang->scrumModel = '敏捷模型'; $lang->all = '所有'; $lang->viewDetails = '查看详情'; diff --git a/module/custom/config.php b/module/custom/config.php index 448a48e6eb..c5d4c332b4 100644 --- a/module/custom/config.php +++ b/module/custom/config.php @@ -4,7 +4,7 @@ $config->custom->canAdd['story'] = 'reasonList,sourceList,priList,categoryLis $config->custom->canAdd['task'] = 'priList,typeList,reasonList'; $config->custom->canAdd['bug'] = 'priList,severityList,osList,browserList,typeList,resolutionList'; $config->custom->canAdd['testcase'] = 'priList,typeList,stageList,resultList,statusList'; -$config->custom->canAdd['testtask'] = 'priList'; +$config->custom->canAdd['testtask'] = 'priList,typeList'; $config->custom->canAdd['todo'] = 'priList,typeList'; $config->custom->canAdd['user'] = 'roleList'; $config->custom->canAdd['block'] = ''; diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index ac5e37523a..0331a7fd96 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -166,6 +166,7 @@ $lang->custom->testcase->fields['review'] = 'Review Required'; $lang->custom->testtask = new stdClass(); $lang->custom->testtask->fields['priList'] = 'Priority'; +$lang->custom->testtask->fields['typeList'] = 'Type'; $lang->custom->testtask->fields['statusList'] = 'Status'; $lang->custom->todo = new stdClass(); diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index 48daaafaa0..eab5f29282 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -166,6 +166,7 @@ $lang->custom->testcase->fields['review'] = 'Need Review'; $lang->custom->testtask = new stdClass(); $lang->custom->testtask->fields['priList'] = 'Priority'; +$lang->custom->testtask->fields['typeList'] = 'Type'; $lang->custom->testtask->fields['statusList'] = 'Status'; $lang->custom->todo = new stdClass(); diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 4bbe7d9751..33e4029bcf 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -166,6 +166,7 @@ $lang->custom->testcase->fields['review'] = 'Validation Requise'; $lang->custom->testtask = new stdClass(); $lang->custom->testtask->fields['priList'] = 'Priorité'; +$lang->custom->testtask->fields['typeList'] = 'Type'; $lang->custom->testtask->fields['statusList'] = 'Statut'; $lang->custom->todo = new stdClass(); diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index bce8b02215..29fdc71ad6 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -166,6 +166,7 @@ $lang->custom->testcase->fields['review'] = '评审流程'; $lang->custom->testtask = new stdClass(); $lang->custom->testtask->fields['priList'] = '优先级'; +$lang->custom->testtask->fields['typeList'] = '测试类型'; $lang->custom->testtask->fields['statusList'] = '状态'; $lang->custom->todo = new stdClass(); diff --git a/module/doc/control.php b/module/doc/control.php index 9a9f1ee051..d66c7ae8f4 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -860,6 +860,7 @@ class doc extends control if($doclib->acl == 'open') return print(html::select('groups[]', $groups, $selectedGroup, "class='form-control picker-select' multiple $dropDirection")); if($doclib->acl == 'default') return print(html::select('groups[]', $groups, $selectedGroup, "class='form-control picker-select' multiple $dropDirection")); if($doclib->acl == 'private') echo 'private'; + return false; } @@ -876,7 +877,15 @@ class doc extends control } if($doclib->acl == 'open') return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control picker-select' $dropDirection")); if($doclib->acl == 'default') return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control picker-select' $dropDirection")); - if($doclib->acl == 'private') echo 'private'; + if($doclib->acl == 'private' and $doclib->type == 'project') + { + echo 'project'; + } + else + { + echo 'private'; + } + return false; } @@ -891,7 +900,7 @@ class doc extends control $selectedUser = $whitelist; } - return print(html::select('users[]', $users, $selectedUser, "class='form-control chosen' multiple")); + return print(html::select('users[]', $users, $selectedUser, "class='form-control picker-select' multiple")); } /** diff --git a/module/doc/js/common.js b/module/doc/js/common.js index 328fed5690..ead6832715 100644 --- a/module/doc/js/common.js +++ b/module/doc/js/common.js @@ -41,6 +41,7 @@ function toggleAcl(acl, type) else { $('#whiteListBox').addClass('hidden'); + if(type == 'doc') loadWhitelist(libID); } if(type == 'lib') @@ -57,8 +58,8 @@ function toggleAcl(acl, type) $.get(link, function(users) { $('#users').replaceWith(users); - $('#users_chosen').remove(); - $('#users').chosen(); + $('#user').next(' .picker').remove(); + $('#users').picker(); }) } } diff --git a/module/doc/js/create.js b/module/doc/js/create.js index 65cbb2073d..151c3619ea 100644 --- a/module/doc/js/create.js +++ b/module/doc/js/create.js @@ -117,9 +117,9 @@ function loadWhitelist(libID) { if(groups != 'private') { - $('#groups').replaceWith(groups); - $('#groups_chosen').remove(); - $('#groups').picker(); + $('#groups').replaceWith(groups); + $('#groups').next('.picker').remove(); + $('#groups').picker(); } }); @@ -132,14 +132,20 @@ function loadWhitelist(libID) $('#whiteListBox').addClass('hidden'); $('#aclprivate').prop('checked', true); } + else if(users == 'project') + { + $('#aclprivate').parent('.radio-inline').addClass('hidden'); + $('#aclcustom').parent('.radio-inline').addClass('hidden'); + $('#whiteListBox').addClass('hidden'); + $('#aclopen').prop('checked', true); + } else { $('#aclopen').parent('.radio-inline').removeClass('hidden'); $('#aclcustom').parent('.radio-inline').removeClass('hidden'); $('#users').replaceWith(users); - $('#users_chosen').remove(); - $('#whiteListBox .picker').remove(); + $('#users').next('.picker').remove(); $('#users').picker(); } }); diff --git a/module/doc/js/edit.js b/module/doc/js/edit.js index 64e78ccdbe..f5ead4f0c2 100644 --- a/module/doc/js/edit.js +++ b/module/doc/js/edit.js @@ -141,9 +141,9 @@ function loadWhitelist(libID) { if(groups != 'private') { - $('#groups').replaceWith(groups); - $('#groups_chosen').remove(); - $('#groups').picker(); + $('#groups').replaceWith(groups); + $('#groups').next('.picker').remove(); + $('#groups').picker(); } }); @@ -162,8 +162,7 @@ function loadWhitelist(libID) $('#aclcustom').parent('.radio-inline').removeClass('hidden'); $('#users').replaceWith(users); - $('#users_chosen').remove(); - $('#whiteListBox .picker').remove(); + $('#user').next('.picker').remove(); $('#users').picker(); } }); diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index 1be6508f32..3e7ca03c0e 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -10,7 +10,6 @@ * @link http://www.zentao.net */ ?> -config->maxCount);?> doc->officeTypes, $docType) !== false):?>
    @@ -109,6 +108,7 @@ $("a[href^='###']").click(function() doclib->control;?> acl == 'default' ? 'open' : $lib->acl;?> + type == 'project' and $acl == 'private') ? 'open' : $acl;?> doc->aclList, $acl, "onchange='toggleAcl(this.value, \"doc\")'");?> doc->noticeAcl['doc'][$acl];?> diff --git a/module/doc/view/edit.html.php b/module/doc/view/edit.html.php index e4ab46d201..9a092fe015 100644 --- a/module/doc/view/edit.html.php +++ b/module/doc/view/edit.html.php @@ -17,7 +17,6 @@ doc->confirmUpdateContent);?> id);?> draft);?> -config->maxCount);?>
    diff --git a/module/execution/control.php b/module/execution/control.php index 2b03d18898..c73ae2f10a 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -745,6 +745,7 @@ class execution extends control /* Save session. */ $this->app->session->set('storyList', $this->app->getURI(true), 'execution'); + $this->app->session->set('executionStoryList', $this->app->getURI(true), 'execution'); /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->executionStoryOrder ? $this->cookie->executionStoryOrder : 'pri'; @@ -2608,6 +2609,8 @@ class execution extends control $productPairs = $this->loadModel('product')->getProductPairsByProject($executionID); if($productPairs) $productID = key($productPairs); + $this->app->session->set('executionStoryList', $this->app->getURI(true), 'execution'); + $this->view->title = $this->lang->execution->storyKanban; $this->view->position[] = html::a($this->createLink('execution', 'story', "executionID=$executionID"), $execution->name); $this->view->position[] = $this->lang->execution->storyKanban; @@ -2910,8 +2913,9 @@ class execution extends control /* Get projects, executions and products. */ $object = $this->project->getByID($objectID, $this->app->tab == 'project' ? 'project' : 'sprint,stage,kanban'); $products = $this->product->getProducts($objectID); - $browseLink = $this->createLink($this->app->tab == 'project' ? 'projectstory' : 'execution', 'story', "objectID=$objectID"); $queryID = ($browseType == 'bySearch') ? (int)$param : 0; + $browseLink = $this->session->executionStoryList; + if($this->app->tab == 'project') $browseLink = $this->createLink('projectstory', 'story', "objectID=$objectID"); $this->session->set('storyList', $this->app->getURI(true), $this->app->tab); // Save session. @@ -3034,6 +3038,7 @@ class execution extends control $this->view->modules = $modules; $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->branchGroups = $branchGroups; + $this->view->browseLink = $browseLink; $this->display(); } diff --git a/module/execution/css/task.css b/module/execution/css/task.css index 9ace13edb6..7b58f130fe 100644 --- a/module/execution/css/task.css +++ b/module/execution/css/task.css @@ -8,3 +8,5 @@ th.c-deadline {text-align: center;} .c-left {text-align: right;} .table-footer {z-index: 1;} .btn-toolbar > .btn {margin-right: 5px !important;} +#taskList .c-progress{padding-right: 8px; text-align: right;} +#datatable-taskList .c-progress{padding-right: 8px; text-align: right;} diff --git a/module/execution/view/linkstory.html.php b/module/execution/view/linkstory.html.php index 8c2aa6ae74..5916f2c709 100644 --- a/module/execution/view/linkstory.html.php +++ b/module/execution/view/linkstory.html.php @@ -20,7 +20,7 @@ execution->linkStory;?>
    - createLink($this->app->rawModule, 'story', "objectID=$objectID"), 'btn btn-link');?> + ' . $lang->goback, '', "class='btn btn-primary'");?>
    diff --git a/module/gitlab/control.php b/module/gitlab/control.php index 1ed38204b1..6d2808fd1f 100644 --- a/module/gitlab/control.php +++ b/module/gitlab/control.php @@ -256,10 +256,10 @@ class gitlab extends control if(strpos($gitlab->url, 'http') !== 0) return $this->send(array('result' => 'fail', 'message' => array('url' => array(sprintf($this->lang->gitlab->hostError, $this->config->gitlab->minCompatibleVersion))))); if(!$gitlab->token) return $this->send(array('result' => 'fail', 'message' => array('token' => array($this->lang->gitlab->tokenError)))); - $user = $this->gitlab->apiGetCurrentUser($gitlab->url, $gitlab->token, true); + $user = $this->gitlab->apiGetCurrentUser($gitlab->url, $gitlab->token); if(!is_object($user)) return $this->send(array('result' => 'fail', 'message' => array('url' => array(sprintf($this->lang->gitlab->hostError, $this->config->gitlab->minCompatibleVersion))))); - if(!isset($user->id)) return $this->send(array('result' => 'fail', 'message' => array('token' => array($this->lang->gitlab->tokenError)))); + if(!isset($user->id) or !isset($user->is_admin) or !$user->is_admin) return $this->send(array('result' => 'fail', 'message' => array('token' => array($this->lang->gitlab->tokenError)))); /* Verify version compatibility. */ $result = $this->gitlab->getVersion($gitlab->url, $gitlab->token); diff --git a/module/gitlab/model.php b/module/gitlab/model.php index 5d6d51db07..9d7c3c2028 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -473,10 +473,9 @@ class gitlabModel extends model * @access public * @return array */ - public function apiGetCurrentUser($host, $token, $rootCheck = false) + public function apiGetCurrentUser($host, $token) { $host = rtrim($host, '/') . "/api/v4%s?private_token=$token"; - if($rootCheck) $host .= '&sudo=1'; return $this->apiGet($host, '/user'); } diff --git a/module/group/control.php b/module/group/control.php index b7ed4f0c48..d399f84c26 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -317,7 +317,9 @@ class group extends control $this->view->title = $title; $this->view->position = $position; $this->view->allUsers = array('' => '') + $groupUsers + $this->loadModel('dept')->getDeptUserPairs($deptID); + $this->view->groupID = $groupID; $this->view->deptID = $deptID; + $this->view->deptName = $deptID ? $this->dao->findById($deptID)->from(TABLE_DEPT)->fetch('name') : ''; $this->view->programs = $programs; $this->view->projects = $projects; $this->view->products = $products; diff --git a/module/group/css/manageprojectadmin.css b/module/group/css/manageprojectadmin.css new file mode 100644 index 0000000000..02ae152621 --- /dev/null +++ b/module/group/css/manageprojectadmin.css @@ -0,0 +1 @@ +#sidebar .cell {margin-top: 40px;} diff --git a/module/group/js/manageprojectadmin.js b/module/group/js/manageprojectadmin.js index 5cb769b150..d636d1d451 100644 --- a/module/group/js/manageprojectadmin.js +++ b/module/group/js/manageprojectadmin.js @@ -32,11 +32,15 @@ function addItem(obj) var id = $(this).attr('id'); $(this).attr('name', name.replace(/\d+/g, maxNum)); $(this).attr('id', id.replace(/\d+/g, maxNum)); + $(this).attr('checked', false); }) $(lastTr).after($newRow); $newRow.find('div.picker').remove(); $newRow.find('.picker-select').val('').picker({chosenMode: true}); + + var $picker = $newRow.find('.picker-select').data('zui.picker'); + $picker.setDisabled(false); setTimeout(function() { $newRow.removeClass('highlight'); diff --git a/module/group/lang/de.php b/module/group/lang/de.php index 3a44e9f896..ac28a47962 100644 --- a/module/group/lang/de.php +++ b/module/group/lang/de.php @@ -20,13 +20,18 @@ $lang->group->managePriv = 'Mehrfachzuordnung'; $lang->group->managePrivByGroup = 'Rechte'; $lang->group->managePrivByModule = 'Modul Rechte'; $lang->group->byModuleTips = '(SHIFT/STRG für Multi-Select)'; +$lang->group->allTips = 'After checking this option, the administrator can manage all objects in the system, including objects created later.'; $lang->group->manageMember = 'Mitglieder'; $lang->group->manageProjectAdmin = 'Manage Program Admins'; $lang->group->confirmDelete = 'Möchten Sie die Gruppe löschen?'; $lang->group->successSaved = 'Gespeichert!'; $lang->group->errorNotSaved = 'Fehlgeschlagen. Bitte aktion und Gruppe wählen.'; $lang->group->viewList = 'Anzeige ist zulässig.'; +$lang->group->object = 'Manage Object'; +$lang->group->manageProgram = 'Manage Program'; $lang->group->manageProject = 'Manage Project'; +$lang->group->manageExecution = 'Manage ' . $lang->execution->common; +$lang->group->manageProduct = 'Manage ' . $lang->productCommon; $lang->group->programList = 'Access Program'; $lang->group->productList = 'Produkte sind zugänglich.'; $lang->group->projectList = 'Projekte sind zugänglich.'; @@ -39,6 +44,7 @@ $lang->group->noneExecution = "No {$lang->execution->common}"; $lang->group->project = 'Project'; $lang->group->group = 'Group'; $lang->group->more = 'More'; +$lang->group->allCheck = 'All'; global $config; if($config->systemMode == 'new') $lang->group->noneProject = 'No Project'; diff --git a/module/group/lang/fr.php b/module/group/lang/fr.php index c94caf4993..112481f2df 100644 --- a/module/group/lang/fr.php +++ b/module/group/lang/fr.php @@ -20,13 +20,18 @@ $lang->group->managePriv = 'Gérer Privilèges'; $lang->group->managePrivByGroup = 'Gérer Privilèges par Groupe'; $lang->group->managePrivByModule = 'Gérer Privilèges par Module'; $lang->group->byModuleTips = '(Shift/Ctrl pour sélection multiple)'; +$lang->group->allTips = 'After checking this option, the administrator can manage all objects in the system, including objects created later.'; $lang->group->manageMember = 'Gérer Membres'; $lang->group->manageProjectAdmin = 'Manage Program Admins'; $lang->group->confirmDelete = "Voulez-vous supprimer ce groupe d'utilisateurs ?"; $lang->group->successSaved = 'Sauvé.'; $lang->group->errorNotSaved = 'Echec. Veuillez sélectionner actions et groupes.'; $lang->group->viewList = 'Accès Consultation'; +$lang->group->object = 'Manage Object'; +$lang->group->manageProgram = 'Manage Program'; $lang->group->manageProject = 'Manage Project'; +$lang->group->manageExecution = 'Manage ' . $lang->execution->common; +$lang->group->manageProduct = 'Manage ' . $lang->productCommon; $lang->group->programList = 'Accè Programs'; $lang->group->productList = 'Accès ' . $lang->productCommon . 's'; $lang->group->projectList = 'Accès ' . $lang->executionCommon . 's'; @@ -39,6 +44,7 @@ $lang->group->noneExecution = "No {$lang->execution->common}"; $lang->group->project = 'Project'; $lang->group->group = 'Group'; $lang->group->more = 'More'; +$lang->group->allCheck = 'All'; global $config; if($config->systemMode == 'new') $lang->group->noneProject = 'No Project'; diff --git a/module/group/view/manageprojectadmin.html.php b/module/group/view/manageprojectadmin.html.php index d96d506a0e..05f3fa90b6 100644 --- a/module/group/view/manageprojectadmin.html.php +++ b/module/group/view/manageprojectadmin.html.php @@ -13,6 +13,12 @@
    EOT; diff --git a/module/install/lang/zh-cn.php b/module/install/lang/zh-cn.php index dd588228df..0b4042c8b7 100644 --- a/module/install/lang/zh-cn.php +++ b/module/install/lang/zh-cn.php @@ -48,17 +48,17 @@ $lang->install->introductionContent = <<尊敬的用户您好,欢迎您使用禅道项目管理系统。

    禅道自15系列开始提供了两种使用模式,一种是经典管理模式,功能较为精简,主要提供了产品和项目两个核心功能;另一种是全新项目集管理模式,增加了项目集和执行的概念。下面是全新项目集管理模式的介绍:

    -

    项目集

    项目集用来管理一组相关的产品和项目,公司高层或者PMO可以用来做战略规划。

    +

    项目集

    项目集用来管理一组相关的产品和项目,公司高层或者PMO可以用来做战略规划。

    -

    产品

    +

    产品

    产品用来将公司的战略细分为可以进行研发的需求,产品经理可以用来做产品的发布计划。

    -

    项目

    +

    项目

    项目用来组织相应的人力进行研发,做好项目过程的跟踪管理,多快好省地完成项目。

    -

    执行

    +

    执行

    执行用来做任务的分解、指派和跟踪,保证项目目标可以落实到人来执行。

    diff --git a/module/kanban/view/createspace.html.php b/module/kanban/view/createspace.html.php index 0f3fac5fbb..3f83d4260f 100644 --- a/module/kanban/view/createspace.html.php +++ b/module/kanban/view/createspace.html.php @@ -35,7 +35,7 @@ kanbanspace->team;?>
    - + fetch('my', 'buildContactLists');?>
    @@ -48,7 +48,7 @@ whitelist;?> - + diff --git a/module/kanban/view/editspace.html.php b/module/kanban/view/editspace.html.php index 0e8a03c1d4..292e7f060c 100644 --- a/module/kanban/view/editspace.html.php +++ b/module/kanban/view/editspace.html.php @@ -36,7 +36,7 @@ kanbanspace->team;?>
    - + fetch('my', 'buildContactLists');?>
    @@ -49,7 +49,7 @@ whitelist;?> - whitelist, 'class="form-control picker-select" multiple');?> + whitelist, 'class="form-control picker-select" multiple data-drop-direction="top"');?> diff --git a/module/kanban/view/viewarchivedcard.html.php b/module/kanban/view/viewarchivedcard.html.php index a9466feb3f..74a334d0c1 100644 --- a/module/kanban/view/viewarchivedcard.html.php +++ b/module/kanban/view/viewarchivedcard.html.php @@ -16,6 +16,7 @@ #archivedCards .kanban-item {border: 1px solid #ddd; border-radius: 4px; padding: 5px;} #archivedCards .kanban-item > .title {display: block; max-height: 38px; overflow: hidden; color: inherit; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;} #archivedCards .kanban-item > .title:hover {color: #2272eb} +#archivedCards .kanban-item > .desc {color: #838a9d; overflow: hidden; white-space:nowrap; text-overflow:ellipsis; padding-top: 5px;} #archivedCards .kanban-item > .info {margin-top: 5px; position: relative;} #archivedCards .kanban-item > .info > .pri {height: 14px; border-width: 1px; font-size: 12px; line-height: 12px; min-width: 14px; padding: 0 1px;} #archivedCards .kanban-item > .info > .time {margin-left: 10px; font-size: 12px} @@ -97,6 +98,7 @@ js::set('systemMode', $this->config->systemMode); $name = isset($card->title) ? $card->title : $card->name; if(common::hasPriv($card->fromType, 'view')) echo html::a($this->createLink($card->fromType, 'view', "id=$card->fromID"), $name, '', "class='cardName' title='$name'"); if(!common::hasPriv($card->fromType, 'view')) echo "
    $name
    "; + if($card->fromType == 'productplan' or $card->fromType == 'build') echo "
    $card->desc
    "; echo "
    "; if(isset($lang->{$card->fromType}->statusList[$card->objectStatus])) echo "" . $lang->{$card->fromType}->statusList[$card->objectStatus] . ''; if(isset($card->date) and !helper::isZeroDate($card->date)) echo "" . date("Y-m-d", strtotime($card->date)) . "" diff --git a/module/my/control.php b/module/my/control.php index 7d96f5344c..9ff1bf6426 100755 --- a/module/my/control.php +++ b/module/my/control.php @@ -453,7 +453,6 @@ EOF; $this->loadModel('execution'); $queryID = ($type == 'bySearch') ? (int)$param : 0; - /* Save session. */ if($type != 'bySearch') $this->session->set('myTaskType', $type); if($this->app->viewType != 'json') $this->session->set('taskList', $this->app->getURI(true), 'execution'); diff --git a/module/my/css/project.css b/module/my/css/project.css index cae5e90bc8..850d58003c 100644 --- a/module/my/css/project.css +++ b/module/my/css/project.css @@ -1,9 +1,10 @@ #projectTableList > tr.drop-not-allowed {opacity: 0.1 !important;} #projectList .c-actions {overflow: visible;} #projectTableList > tr:last-child .c-actions .dropdown-menu {top: auto; bottom: 100%; margin-bottom: -5px;} +#projectList .c-budget {width: 100px; padding-right: 20px;} +#projectTableList .c-budget {width: 100px; padding-right: 20px;} .c-date {width: 80px;} -.c-budget {width: 80px;} .label-warning, .label-info {width: 60px !important;} .project-type-label.label-outline {width: 50px; min-width: 50px;} .c-date {width: 120px;} diff --git a/module/my/css/task.css b/module/my/css/task.css index b2bdee3a98..22a28dbcc9 100644 --- a/module/my/css/task.css +++ b/module/my/css/task.css @@ -17,3 +17,4 @@ td.delayed {background: #e84e0f !important; color: white;} .c-hours {width: 50px;} .c-status, .c-date, .c-user-short {width: 70px;} .c-project {width: 130px;} +#taskTable .c-user{width: 110px; padding-left: 29px;} diff --git a/module/my/css/todo.css b/module/my/css/todo.css index 4391484b57..5ff682bd50 100644 --- a/module/my/css/todo.css +++ b/module/my/css/todo.css @@ -4,3 +4,7 @@ .btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.2);} .btn-toolbar .space {min-height: 1px; margin: 0 -3px 0 10px;} .iconCenter {top: -2px !important;} + +#switchButton {background: #fff !important;} +.panel-actions {position: relative; padding: 0;} +.panel-actions .btn-icon {padding-left: 7px;} diff --git a/module/my/view/project.html.php b/module/my/view/project.html.php index 6c67c0bb8b..f88cb9afaf 100644 --- a/module/my/view/project.html.php +++ b/module/my/view/project.html.php @@ -64,7 +64,7 @@ begin;?> end == LONG_TIME ? $this->lang->project->longTime : $project->end;?> app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?> - budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $lang->project->future;?> + budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $lang->project->future;?> PM]) ? $PMList[$project->PM]->id : ''?> PM)) echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), zget($users, $project->PM), '', "data-toggle='modal' data-type='iframe' data-width='600'");?> diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index 6db91d204f..b40d3042f8 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -35,6 +35,12 @@
    + edition != 'open' and !empty($app->user) and common::hasPriv('todo', 'calendar')):?> +
    +  ", '', "class='btn btn-icon' title='{$lang->todo->calendar}' id='switchButton'");?> +  ", '', "class='btn btn-icon text-primary' title='{$lang->todo->list}' id='switchButton'");?> +
    + id}&orderBy=$orderBy", 'html', true), " " . $lang->todo->export, '', "class='btn btn-link export' data-width='600px'");?>