* Finish task #96932.
This commit is contained in:
@@ -27,7 +27,7 @@ class form extends formBase
|
||||
global $app, $lang;
|
||||
$module = $app->getModuleName();
|
||||
$method = $app->getMethodName();
|
||||
$text = !empty($lang->$module->$method) ? $lang->$module->$method : zget($lang, $method);
|
||||
$text = !empty($lang->$module->$method) ? $lang->$module->$method : zget($lang, $method, '');
|
||||
|
||||
$defaultProps = array();
|
||||
$defaultProps['submitBtnText'] = $text;
|
||||
|
||||
@@ -11,7 +11,6 @@ class moduleMenu extends wg
|
||||
'activeKey?: int',
|
||||
'settingLink?: string',
|
||||
'closeLink: string',
|
||||
'branchType?: string=""',
|
||||
'showDisplay?: bool=true',
|
||||
'allText?: string'
|
||||
);
|
||||
@@ -80,7 +79,6 @@ class moduleMenu extends wg
|
||||
{
|
||||
$settingLink = $this->prop('settingLink');
|
||||
$showDisplay = $this->prop('showDisplay');
|
||||
$branchType = $this->prop('branchType');
|
||||
if(!$settingLink && !$showDisplay) return null;
|
||||
|
||||
global $app;
|
||||
@@ -108,7 +106,7 @@ class moduleMenu extends wg
|
||||
(
|
||||
setClass('btn white'),
|
||||
set('data-toggle', 'modal'),
|
||||
set::href(helper::createLink('datatable', 'ajaxDisplay', "datatableId=$datatableId&moduleName=$app->moduleName&methodName=$app->methodName¤tModule=$currentModule¤tMethod=$currentMethod&branchType=$branchType")),
|
||||
set::href(helper::createLink('datatable', 'ajaxDisplay', "datatableId=$datatableId&moduleName=$app->moduleName&methodName=$app->methodName¤tModule=$currentModule¤tMethod=$currentMethod")),
|
||||
$lang->displaySetting
|
||||
)
|
||||
: null,
|
||||
|
||||
@@ -95,6 +95,7 @@ $lang->waterfallPlusModel = 'Waterfall Plus';
|
||||
$lang->all = 'All';
|
||||
$lang->viewDetails = 'View Details';
|
||||
$lang->childrenAB = 'C';
|
||||
$lang->branchName = 'Branch/Platform';
|
||||
|
||||
$lang->actions = 'Aktionen';
|
||||
$lang->restore = 'Wiederherstellen';
|
||||
|
||||
@@ -95,6 +95,7 @@ $lang->waterfallPlusModel = 'Waterfall Plus';
|
||||
$lang->all = 'All';
|
||||
$lang->viewDetails = 'View Details';
|
||||
$lang->childrenAB = 'C';
|
||||
$lang->branchName = 'Branch/Platform';
|
||||
|
||||
$lang->actions = 'Action';
|
||||
$lang->restore = 'Reset';
|
||||
|
||||
@@ -95,6 +95,7 @@ $lang->waterfallPlusModel = 'Waterfall Plus';
|
||||
$lang->all = 'All';
|
||||
$lang->viewDetails = 'View Details';
|
||||
$lang->childrenAB = 'C';
|
||||
$lang->branchName = 'Branch/Platform';
|
||||
|
||||
$lang->actions = 'Action';
|
||||
$lang->restore = 'Réinitialiser';
|
||||
|
||||
@@ -95,6 +95,7 @@ $lang->waterfallPlusModel = '融合瀑布模型';
|
||||
$lang->all = '全部';
|
||||
$lang->viewDetails = '查看详情';
|
||||
$lang->childrenAB = '子';
|
||||
$lang->branchName = '分支/平台';
|
||||
|
||||
$lang->actions = '操作';
|
||||
$lang->restore = '恢复默认';
|
||||
|
||||
@@ -30,14 +30,11 @@ class datatable extends control
|
||||
* @param string $methodName
|
||||
* @param string $currentModule
|
||||
* @param string $currentMethod
|
||||
* @param string $branchType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxDisplay(string $datatableId, string $moduleName, string $methodName, string $currentModule, string $currentMethod, string $branchType)
|
||||
public function ajaxDisplay(string $datatableId, string $moduleName, string $methodName, string $currentModule, string $currentMethod)
|
||||
{
|
||||
if($branchType) $this->lang->datatable->showBranch = sprintf($this->lang->datatable->showBranch, isset($this->lang->datatable->$branchType) ? $this->lang->datatable->$branchType : $this->lang->datatable->branch);
|
||||
|
||||
$this->app->loadLang($currentModule);
|
||||
$this->app->loadConfig($currentModule);
|
||||
|
||||
@@ -46,8 +43,6 @@ class datatable extends control
|
||||
$this->view->methodName = $methodName;
|
||||
$this->view->currentModule = $currentModule;
|
||||
$this->view->currentMethod = $currentMethod;
|
||||
$this->view->isShowBranch = $branchType && $branchType != 'normal';
|
||||
$this->view->showBranch = isset($this->config->$currentModule->$currentMethod->showBranch) ? $this->config->$currentModule->$currentMethod->showBranch : 1;
|
||||
$this->render();
|
||||
}
|
||||
|
||||
|
||||
@@ -43,13 +43,6 @@ class datatableModel extends model
|
||||
|
||||
foreach($fieldList as $fieldName => $items)
|
||||
{
|
||||
if($fieldName === 'branch')
|
||||
{
|
||||
if($this->session->currentProductType === 'branch') $fieldList[$fieldName]['title'] = $this->lang->datatable->branch;
|
||||
if($this->session->currentProductType === 'platform') $fieldList[$fieldName]['title'] = $this->lang->datatable->platform;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Translate field title. */
|
||||
if(!isset($items['title'])) $items['title'] = $fieldName;
|
||||
$title = zget($this->lang->$module, $items['title'], zget($this->lang, $items['title'], $items['title']));
|
||||
|
||||
@@ -16,7 +16,7 @@ global $lang, $app;
|
||||
$app->loadLang('datatable');
|
||||
$showModule = isset($config->$currentModule->$currentMethod->showModule) ? $config->$currentModule->$currentMethod->showModule : '0';
|
||||
$showBranch = isset($config->$currentModule->$currentMethod->showBranch) ? $config->$currentModule->$currentMethod->showBranch : '0';
|
||||
$showAllModule = isset($config->execution->task->allModule) ? $config->execution->task->allModule : 0;
|
||||
$showAllModule = isset($config->execution->task->allModule) ? $config->execution->task->allModule : 0;
|
||||
|
||||
set::title($lang->datatable->displaySetting);
|
||||
form
|
||||
@@ -57,17 +57,6 @@ form
|
||||
set::value($showAllModule),
|
||||
),
|
||||
) : null,
|
||||
$isShowBranch ? formGroup
|
||||
(
|
||||
set::label($lang->datatable->showBranch),
|
||||
radiolist
|
||||
(
|
||||
set::name('showBranch'),
|
||||
set::inline(true),
|
||||
set::items($lang->datatable->showBranchList),
|
||||
set::value($showBranch),
|
||||
),
|
||||
) : null,
|
||||
input
|
||||
(
|
||||
set('class', 'hidden'),
|
||||
|
||||
@@ -204,6 +204,13 @@ class execution extends control
|
||||
$showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
|
||||
$extra = $showAllModule ? 'allModule' : '';
|
||||
|
||||
/* Append branches to task. */
|
||||
$branchGroups = $this->loadModel('branch')->getByProducts(array_keys($this->view->products));
|
||||
foreach($tasks as $id => $task)
|
||||
{
|
||||
if(!empty($task->product) and isset($branchGroups[$task->product][$task->branch])) $task->branch = $branchGroups[$task->product][$task->branch];
|
||||
}
|
||||
|
||||
/* Assign. */
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->pager = $pager;
|
||||
|
||||
@@ -97,7 +97,6 @@ sidebar
|
||||
'activeKey' => $moduleID,
|
||||
'settingLink' => $this->createLink('tree', 'browsetask', "rootID=$execution->id&productID=0"),
|
||||
'closeLink' => $this->createLink('execution', 'task'),
|
||||
'branchType' => $showBranch ? 'branch' : ''
|
||||
)))
|
||||
);
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ $fnGenerateSideBar = function() use ($moduleTree, $moduleID, $productID, $branch
|
||||
'activeKey' => $moduleID,
|
||||
'settingLink' => $this->createLink('tree', 'browse', "rootID=$productID&view=story¤tModuleID=0&branch=$branchID"),
|
||||
'closeLink' => createLink('execution', 'task'),
|
||||
'branchType' => $branchType
|
||||
)))
|
||||
);
|
||||
};
|
||||
|
||||
@@ -34,6 +34,12 @@ $config->task->dtable->fieldList['type']['map'] = $lang->task->typeList;
|
||||
$config->task->dtable->fieldList['type']['sortType'] = true;
|
||||
$config->task->dtable->fieldList['type']['group'] = 1;
|
||||
|
||||
$config->task->dtable->fieldList['branch']['title'] = $lang->branchName;
|
||||
$config->task->dtable->fieldList['branch']['type'] = 'text';
|
||||
$config->task->dtable->fieldList['branch']['sortType'] = false;
|
||||
$config->task->dtable->fieldList['branch']['width'] = '100';
|
||||
$config->task->dtable->fieldList['branch']['group'] = 1;
|
||||
|
||||
$config->task->dtable->fieldList['openedBy']['title'] = $lang->task->openedByAB;
|
||||
$config->task->dtable->fieldList['openedBy']['type'] = 'user';
|
||||
$config->task->dtable->fieldList['openedBy']['sortType'] = true;
|
||||
|
||||
Reference in New Issue
Block a user