Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -205,16 +205,17 @@ class block extends control
|
||||
*
|
||||
* @param string $module
|
||||
* @param string $type
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function dashboard($module, $type = '')
|
||||
public function dashboard($module, $type = '', $projectID = 0)
|
||||
{
|
||||
if($this->loadModel('user')->isLogon()) $this->session->set('blockModule', $module);
|
||||
$blocks = $this->block->getBlockList($module, $type);
|
||||
|
||||
$commonField = 'common';
|
||||
if($module == 'project')
|
||||
if($module == 'project' and $projectID)
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
$commonField = $project->model . 'common';
|
||||
|
||||
@@ -20,11 +20,7 @@ class branch extends control
|
||||
*/
|
||||
public function manage($productID)
|
||||
{
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID);
|
||||
|
||||
$moduleIndex = array_search('branch', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->lang->branch->menu = $this->lang->product->setMenu;
|
||||
$this->loadModel('product')->setMenu($productID);
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
@@ -33,8 +29,6 @@ class branch extends control
|
||||
}
|
||||
|
||||
$products = $this->loadModel('product')->getPairs('nocode');
|
||||
$this->product->setMenu($products, $productID);
|
||||
|
||||
$position[] = html::a($this->createLink('product', 'browse', "productID=$productID"), zget($products, $productID));
|
||||
$position[] = $this->lang->branch->manage;
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ class bug extends control
|
||||
$extras = str_replace(array(',', ' '), array('&', ''), $extras);
|
||||
parse_str($extras, $output);
|
||||
|
||||
if(isset($output['executionID'])) commonModel::setAppObjectID('execution', $output['executionID']);
|
||||
if(isset($output['executionID'])) commonModel::setMenuVars('execution', $output['executionID']);
|
||||
|
||||
foreach($output as $paramKey => $paramValue)
|
||||
{
|
||||
@@ -912,8 +912,8 @@ class bug extends control
|
||||
$this->loadModel('my')->setMenu();
|
||||
$moduleIndex = array_search('bug', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->lang->task->menu = $this->lang->my->workMenu;
|
||||
$this->lang->my->menu->myWork['subModule'] = 'bug';
|
||||
$this->lang->task->menu = $this->lang->my->menu->work;
|
||||
$this->lang->my->menu->work['subModule'] = 'bug';
|
||||
|
||||
$this->view->position[] = html::a($this->createLink('my', 'bug'), $this->lang->my->bug);
|
||||
$this->view->title = "BUG" . $this->lang->bug->batchEdit;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Set duplicate field.
|
||||
*
|
||||
* @param string $resolution
|
||||
*
|
||||
* @param string $resolution
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -68,3 +68,8 @@ $(document).on('change', 'select', function()
|
||||
$(this).trigger("change");
|
||||
}
|
||||
})
|
||||
|
||||
$(function()
|
||||
{
|
||||
$('#subNavbar li[data-id="bug"]').addClass('active');
|
||||
});
|
||||
|
||||
@@ -40,14 +40,23 @@ class build extends control
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
$this->project->setMenu($projectID);
|
||||
$model = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('model');
|
||||
$this->lang->project->menu = $this->lang->$model->menu;
|
||||
$this->lang->project->menuOrder = $this->lang->$model->menuOrder;
|
||||
commonModel::setMenuVars('project', $projectID);
|
||||
|
||||
$executions = $this->execution->getPairs($projectID);
|
||||
$executionID = isset($executions[$this->session->executionID]) ? $this->session->executionID : key($executions);
|
||||
$this->session->set('executionID', 0);
|
||||
$this->session->set('PRJ', $projectID);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
{
|
||||
$executions = $this->execution->getPairs($projectID);
|
||||
$executionID = $executionID == 0 ? key($executions) : $executionID;
|
||||
$execution = $this->execution->getByID($executionID);
|
||||
$executions = $this->execution->getPairs($execution->project);
|
||||
$this->execution->setMenu($executions, $executionID);
|
||||
|
||||
$this->session->set('PRJ', $execution->project);
|
||||
}
|
||||
|
||||
$productGroups = $this->execution->getProducts($executionID);
|
||||
@@ -103,6 +112,14 @@ class build extends control
|
||||
$this->loadModel('product');
|
||||
$build = $this->build->getById((int)$buildID);
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
$model = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($build->project)->fetch('model');
|
||||
$this->lang->project->menu = $this->lang->$model->menu;
|
||||
$this->lang->project->menuOrder = $this->lang->$model->menuOrder;
|
||||
commonModel::setMenuVars('project', $build->project);
|
||||
}
|
||||
|
||||
/* Set menu. */
|
||||
$this->execution->setMenu($this->execution->getPairs($build->project), $build->execution);
|
||||
|
||||
@@ -164,10 +181,19 @@ class build extends control
|
||||
*/
|
||||
public function view($buildID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
|
||||
{
|
||||
|
||||
$build = $this->build->getByID((int)$buildID, true);
|
||||
if(!$build) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
$this->session->PRJ = $build->project;
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
$model = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($build->project)->fetch('model');
|
||||
$this->lang->project->menu = $this->lang->$model->menu;
|
||||
$this->lang->project->menuOrder = $this->lang->$model->menuOrder;
|
||||
commonModel::setMenuVars('project', $build->project);
|
||||
}
|
||||
|
||||
/* Set session and load modules. */
|
||||
if($type == 'story')$this->session->set('storyList', $this->app->getURI(true));
|
||||
if($type == 'bug') $this->session->set('bugList', $this->app->getURI(true));
|
||||
@@ -199,7 +225,7 @@ class build extends control
|
||||
foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage;
|
||||
|
||||
/* Set menu. */
|
||||
commonModel::setAppObjectID('execution', $build->execution);
|
||||
commonModel::setMenuVars('execution', $build->execution);
|
||||
$executions = $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'empty');
|
||||
|
||||
$this->view->title = "BUILD #$build->id $build->name - " . $executions[$build->execution];
|
||||
@@ -550,7 +576,7 @@ class build extends control
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$allBugs = $this->bug->getBySearch($build->product, $build->branch, $queryID, 'id_desc', $build->bugs, $pager);
|
||||
$allBugs = $this->bug->getBySearch($build->product, $build->branch, $queryID, 'id_desc', $build->bugs, $pager, $build->project);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ $lang->project = new stdclass();
|
||||
$lang->scrum = new stdclass();
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->execution = new stdclass();
|
||||
$lang->story = new stdclass();
|
||||
$lang->release = new stdclass();
|
||||
$lang->branch = new stdclass();
|
||||
$lang->productplan = new stdclass();
|
||||
@@ -62,6 +63,14 @@ $lang->team = new stdclass();
|
||||
$lang->automation = new stdclass();
|
||||
$lang->personnel = new stdclass();
|
||||
$lang->mail = new stdclass();
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->ci = new stdclass();
|
||||
$lang->datatable = new stdclass();
|
||||
$lang->tree = new stdclass();
|
||||
$lang->api = new stdclass();
|
||||
$lang->file = new stdclass();
|
||||
$lang->misc = new stdclass();
|
||||
|
||||
$lang->projectrelease = new stdclass();
|
||||
$lang->projectstory = new stdclass();
|
||||
|
||||
+20
-12
@@ -36,6 +36,7 @@ $lang->mainNav->menuOrder[45] = 'admin';
|
||||
/* My menu. */
|
||||
$lang->my->menu = new stdclass();
|
||||
$lang->my->menu->index = array('link' => "$lang->dashboard|my|index");
|
||||
$lang->my->menu->calendar = array('link' => "$lang->calendar|my|calendar|", 'subModule' => 'todo', 'alias' => 'todo');
|
||||
$lang->my->menu->work = array('link' => "{$lang->my->work}|my|work|mode=task");
|
||||
if($config->systemMode == 'new') $lang->my->menu->project = array('link' => "{$lang->project->common}|my|project|");
|
||||
$lang->my->menu->execution = array('link' => "{$lang->execution->common}|my|execution|type=undone");
|
||||
@@ -46,14 +47,15 @@ $lang->my->menu->contacts = array('link' => "$lang->contact|my|managecontacts|
|
||||
|
||||
/* My menu order. */
|
||||
$lang->my->menuOrder[5] = 'index';
|
||||
$lang->my->menuOrder[10] = 'work';
|
||||
$lang->my->menuOrder[15] = 'project';
|
||||
$lang->my->menuOrder[20] = 'execution';
|
||||
$lang->my->menuOrder[25] = 'contribute';
|
||||
$lang->my->menuOrder[30] = 'score';
|
||||
$lang->my->menuOrder[35] = 'dynamic';
|
||||
$lang->my->menuOrder[40] = 'follow';
|
||||
$lang->my->menuOrder[45] = 'contacts';
|
||||
$lang->my->menuOrder[10] = 'calendar';
|
||||
$lang->my->menuOrder[15] = 'work';
|
||||
$lang->my->menuOrder[20] = 'project';
|
||||
$lang->my->menuOrder[25] = 'execution';
|
||||
$lang->my->menuOrder[30] = 'contribute';
|
||||
$lang->my->menuOrder[35] = 'score';
|
||||
$lang->my->menuOrder[40] = 'dynamic';
|
||||
$lang->my->menuOrder[45] = 'follow';
|
||||
$lang->my->menuOrder[50] = 'contacts';
|
||||
|
||||
$lang->my->menu->work['subMenu'] = new stdclass();
|
||||
$lang->my->menu->work['subMenu']->task = "{$lang->task->common}|my|work|mode=task";
|
||||
@@ -63,6 +65,13 @@ $lang->my->menu->work['subMenu']->bug = "{$lang->bug->common}|my|work|mode=
|
||||
$lang->my->menu->work['subMenu']->testcase = "{$lang->testcase->common}|my|work|mode=testcase&type=assigntome";
|
||||
$lang->my->menu->work['subMenu']->testtask = "{$lang->testtask->common}|my|work|mode=testtask&type=wait";
|
||||
|
||||
$lang->my->menu->work['menuOrder'][5] = 'task';
|
||||
$lang->my->menu->work['menuOrder'][10] = 'requirement';
|
||||
$lang->my->menu->work['menuOrder'][15] = 'story';
|
||||
$lang->my->menu->work['menuOrder'][20] = 'bug';
|
||||
$lang->my->menu->work['menuOrder'][25] = 'testcase';
|
||||
$lang->my->menu->work['menuOrder'][30] = 'testtask';
|
||||
|
||||
$lang->my->menu->contribute['subMenu'] = new stdclass();
|
||||
$lang->my->menu->contribute['subMenu']->task = "{$lang->task->common}|my|contribute|mode=task";
|
||||
if($config->URAndSR) $lang->my->menu->contribute['subMenu']->requirement = "$lang->URCommon|my|contribute|mode=requirement";
|
||||
@@ -131,7 +140,7 @@ $lang->product->menuOrder[65] = 'all';
|
||||
$lang->product->menu->settings['subMenu'] = new stdclass();
|
||||
$lang->product->menu->settings['subMenu']->view = array('link' => "{$lang->overview}|product|view|productID=%s", 'alias' => 'edit');
|
||||
$lang->product->menu->settings['subMenu']->module = array('link' => "{$lang->module}|tree|browse|product=%s&view=story", 'subModule' => 'tree');
|
||||
// $lang->product->menu->settings['subMenu']->branch = array('link' => "@branch@|branch|manage|product=%s", 'subModule' => 'branch');
|
||||
$lang->product->menu->settings['subMenu']->branch = array('link' => "@branch@|branch|manage|product=%s", 'subModule' => 'branch');
|
||||
$lang->product->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|product|whitelist|product=%s", 'subModule' => 'personnel');
|
||||
|
||||
$lang->product->dividerMenu = $config->URAndSR ? ',requirement,set,' : ',track,set,';
|
||||
@@ -380,14 +389,14 @@ $lang->company->menuOrder[30] = 'addUser';
|
||||
|
||||
/* Admin menu. */
|
||||
$lang->admin->menu = new stdclass();
|
||||
$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany', 'exclude' => 'admin-safe');
|
||||
$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
|
||||
$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,');
|
||||
$lang->admin->menu->model = array('link' => "$lang->model|custom|browsestoryconcept|", 'subModule' => 'holiday');
|
||||
$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-timezone');
|
||||
$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension');
|
||||
$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry');
|
||||
$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook');
|
||||
$lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|index", 'subModule' => 'cron,backup,action,search,admin');
|
||||
$lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|index", 'subModule' => 'cron,backup,action,search,admin', 'exclude' => 'admin-index');
|
||||
|
||||
/* Admin menu order. */
|
||||
$lang->admin->menuOrder[5] = 'index';
|
||||
@@ -438,7 +447,6 @@ $lang->subject->menu->storyConcept = array('link' => "{$lang->subject->storyConc
|
||||
$lang->system = new stdclass();
|
||||
$lang->system->menu = new stdclass();
|
||||
$lang->system->menu->team = array('link' => "{$lang->team->common}|my|team|", 'subModule' => 'user');
|
||||
$lang->system->menu->calendar = array('link' => "$lang->calendar|my|calendar|", 'subModule' => 'todo', 'alias' => 'todo');
|
||||
$lang->system->menu->dynamic = array('link' => "$lang->dynamic|company|dynamic|");
|
||||
$lang->system->menu->view = array('link' => "{$lang->company->common}|company|view");
|
||||
|
||||
|
||||
+2
-18
@@ -125,7 +125,7 @@ class commonModel extends model
|
||||
public function setOpenApp()
|
||||
{
|
||||
$openApp = $this->app->openApp;
|
||||
if($this->lang->navGroup->$openApp)
|
||||
if(isset($this->lang->navGroup->$openApp))
|
||||
{
|
||||
$this->app->openApp = $this->lang->navGroup->$openApp;
|
||||
}
|
||||
@@ -665,7 +665,7 @@ class commonModel extends model
|
||||
$exclude = isset($menuItem->exclude) ? $menuItem->exclude : '';
|
||||
|
||||
$active = '';
|
||||
if($menuItem->name == $currentModule and strpos(",$exclude,", ",$currentMethod,") === false)
|
||||
if($menuItem->name == $currentModule and strpos(",$exclude,", ",$currentModule-$currentMethod,") === false)
|
||||
{
|
||||
$activeMenu = $menuItem->name;
|
||||
$active = 'active';
|
||||
@@ -789,8 +789,6 @@ class commonModel extends model
|
||||
|
||||
$openApp = $app->openApp;
|
||||
|
||||
self::getModuleMenu($activeMenu);
|
||||
|
||||
if(!isset($lang->$openApp->menu))
|
||||
{
|
||||
echo "<ul></ul>";
|
||||
@@ -2355,20 +2353,6 @@ EOD;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get my module menu by methodName.
|
||||
*
|
||||
* @param string $activeMenu
|
||||
* @static
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public static function getModuleMenu($activeMenu)
|
||||
{
|
||||
global $app, $lang;
|
||||
$lang->{$app->openApp}->menu = $lang->{$app->openApp}->menu->$activeMenu['subMenu'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get relations for two object.
|
||||
*
|
||||
|
||||
@@ -14,7 +14,7 @@ include 'chosen.html.php';
|
||||
<nav id='navbar'><?php $activeMenu = commonModel::printMainMenu();?></nav>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(isset($lang->{$app->openApp}->menu->$activeMenu) and isset($lang->{$app->openApp}->menu->$activeMenu['subMenu'])):?>
|
||||
<?php if(isset($lang->{$app->openApp}->menu->$activeMenu) and isset($lang->{$app->openApp}->menu->{$activeMenu}['subMenu'])):?>
|
||||
<div id='subHeader'>
|
||||
<div class='container'>
|
||||
<div id="pageNav" class='btn-toolbar'><?php if(isset($lang->modulePageNav)) echo $lang->modulePageNav;?></div>
|
||||
|
||||
@@ -195,7 +195,7 @@ class customModel extends model
|
||||
}
|
||||
elseif($module)
|
||||
{
|
||||
$menuOrder = ($module == 'main' and isset($lang->menuOrder)) ? $lang->menuOrder : (isset($lang->menu->$module['menuOrder']) ? $lang->menu->$module['menuOrder'] : array());
|
||||
$menuOrder = ($module == 'main' and isset($lang->menuOrder)) ? $lang->menuOrder : (isset($lang->menu->{$module}['menuOrder']) ? $lang->menu->{$module}['menuOrder'] : array());
|
||||
if($menuOrder)
|
||||
{
|
||||
ksort($menuOrder);
|
||||
@@ -321,7 +321,8 @@ class customModel extends model
|
||||
if(empty($module)) $module = 'main';
|
||||
|
||||
global $app, $lang, $config;
|
||||
$allMenu = $module == 'main' ? $lang->menu : $lang->menu->$module['subMenu'];
|
||||
if($module == 'main') $allMenu = $lang->menu;
|
||||
if($module != 'main' and isset($lang->menu->$module) and isset($lang->menu->{$module}['subMenu'])) $allMenu = $lang->menu->{$module}['subMenu'];
|
||||
if($module == 'product' and isset($allMenu->branch)) $allMenu->branch = str_replace('@branch@', $lang->custom->branch, $allMenu->branch);
|
||||
$flowModule = $config->global->flow . '_' . $module;
|
||||
$customMenu = isset($config->customMenu->$flowModule) ? $config->customMenu->$flowModule : array();
|
||||
|
||||
@@ -451,7 +451,7 @@ class doc extends control
|
||||
/* Set my menu. */
|
||||
if($this->app->openApp == 'my')
|
||||
{
|
||||
$this->lang->doc->menu = $this->lang->my->contributeMenu;
|
||||
$this->lang->doc->menu = $this->lang->my->menu->contribute;
|
||||
$this->lang->modulePageNav = '';
|
||||
$this->lang->TRActions = '';
|
||||
$this->lang->my->menu->contribute['subModule'] = 'doc';
|
||||
@@ -932,7 +932,7 @@ class doc extends control
|
||||
$productID = $type == 'product' ? $objectID : 0;
|
||||
$executionID = $type == 'execution' ? $objectID : 0;
|
||||
$this->doc->setMenu($type, 0, 0, $productID, $executionID, $crumb);
|
||||
|
||||
|
||||
}
|
||||
elseif($from == 'execution')
|
||||
{
|
||||
|
||||
@@ -2089,8 +2089,11 @@ class execution extends control
|
||||
$diffProducts = array_merge(array_diff($oldProducts, $newProducts), array_diff($newProducts, $oldProducts));
|
||||
if($diffProducts) $this->loadModel('action')->create($this->objectType, $executionID, 'Managed', '', !empty($_POST['products']) ? join(',', $_POST['products']) : '');
|
||||
|
||||
if(isonlybody()) die(js::reload('parent'));
|
||||
die(js::locate($browseExecutionLink));
|
||||
if(isonlybody())
|
||||
{
|
||||
$this->session->set('executionID' , $executionID);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
$this->loadModel('product');
|
||||
|
||||
@@ -851,7 +851,7 @@ class executionModel extends model
|
||||
}
|
||||
|
||||
$dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "executionID=$executionID&module=$currentModule&method=$currentMethod&extra=");
|
||||
$output = "<div class='btn-group header-btn'>" . html::a(helper::createLink('execution', 'all'), "<i class='icon icon-run'></i> {$this->lang->execution->common}", '', "class='btn'") . '</div>';
|
||||
$output = "<div class='btn-group header-btn'><i class='icon icon-run'></i> {$this->lang->execution->common}</div> ";
|
||||
$output .= "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentExecutionName}'><span class='text'>{$currentExecutionName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
$output .= "</div></div>";
|
||||
|
||||
@@ -50,7 +50,7 @@ foreach($executions as $execution)
|
||||
?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<?php echo html::a(helper::createLink('execution', 'all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->execution->all, '', 'class="not-list-item"'); ?>
|
||||
<?php //echo html::a(helper::createLink('execution', 'all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->execution->all, '', 'class="not-list-item"'); ?>
|
||||
<a class='pull-right toggle-right-col not-list-item'><?php echo $lang->execution->doneExecutions;?><i class='icon icon-angle-right'></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
}
|
||||
if(moduleName === 'my')
|
||||
{
|
||||
if(['todo', 'team', 'calendar'].includes(methodLowerCase)) return 'system';
|
||||
if(['team'].includes(methodLowerCase)) return 'system';
|
||||
}
|
||||
if(moduleName === 'company') if(methodLowerCase == 'browse') return 'admin';
|
||||
if(moduleName === 'tree')
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<?php echo $lang->mail->successSaved;?>
|
||||
<?php if($this->post->turnon):?>
|
||||
<?php if($mailExist):?>
|
||||
<?php echo html::a(inlink('test'), $lang->mail->test . ' <i class="icon-project"></i>', '', "class='btn btn-primary btn-sm'");?>
|
||||
<?php echo html::a(inlink('test'), $lang->mail->test, '', "class='btn btn-primary btn-sm'");?>
|
||||
<?php else:?>
|
||||
<span class='content alert-warning'>
|
||||
<i class="icon-exclamation-sign"></i><?php echo $lang->mail->setForUser;?>
|
||||
|
||||
@@ -129,7 +129,6 @@ class my extends control
|
||||
*/
|
||||
public function todo($type = 'before', $userID = '', $status = 'all', $orderBy = "date_desc,status,begin", $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->lang->navGroup->my = 'system';
|
||||
/* Save session. */
|
||||
$uri = $this->app->getURI(true);
|
||||
if($this->app->viewType != 'json')
|
||||
|
||||
@@ -132,7 +132,7 @@ class product extends control
|
||||
$this->loadModel('execution');
|
||||
|
||||
/* Set product, module and query. */
|
||||
$productID = $this->app->openApp != 'projectstory' ? $this->product->saveState($productID, $this->products) : $productID;
|
||||
$productID = $this->app->openApp != 'project' ? $this->product->saveState($productID, $this->products) : $productID;
|
||||
$branch = ($branch === '') ? (int)$this->cookie->preBranch : (int)$branch;
|
||||
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
@@ -1685,5 +1685,15 @@ class productModel extends model
|
||||
$this->lang->switcherMenu = $this->getSwitcher($productID, $extra, $branch);
|
||||
$params = array('branch' => $branch);
|
||||
common::setMenuVars('product', $productID, $params);
|
||||
|
||||
if($product->type == 'normal')
|
||||
{
|
||||
unset($this->lang->product->menu->settings['subMenu']->branch);
|
||||
}
|
||||
else
|
||||
{
|
||||
$branchLink = $this->lang->product->menu->settings['subMenu']->branch['link'];
|
||||
$this->lang->product->menu->settings['subMenu']->branch['link'] = str_replace('@branch@', $this->lang->product->branchName[$product->type], $branchLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ foreach($products as $product)
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<?php //echo html::a(helper::createLink('product', 'all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->product->all, '', 'class="not-list-item"'); ?>
|
||||
<?php echo html::a(helper::createLink('product', 'create'), '<i class="icon icon-plus"></i> ' . $lang->product->create, '', 'class="not-list-item" data-app="product"'); ?>
|
||||
<?php //echo html::a(helper::createLink('project', 'browse', 'programID=0&browseType=all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->project->all, '', 'class="not-list-item"'); ?>
|
||||
<a class='pull-right toggle-right-col not-list-item'><?php echo $lang->product->closed?><i class='icon icon-angle-right'></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@ $lang->program->children = '子项目集';
|
||||
$lang->program->parent = '父项目集';
|
||||
$lang->program->allInput = '项目集总投入';
|
||||
$lang->program->teamCount = '项目集成员';
|
||||
$lang->program->longTime = '长期项目';
|
||||
$lang->program->longTime = '长期项目集';
|
||||
$lang->program->view = '项目集详情';
|
||||
|
||||
/* Actions. */
|
||||
|
||||
@@ -69,7 +69,7 @@ $config->project->datatable->fieldList['budget']['required'] = 'yes';
|
||||
|
||||
$config->project->datatable->fieldList['teamCount']['title'] = 'teamCount';
|
||||
$config->project->datatable->fieldList['teamCount']['fixed'] = 'no';
|
||||
$config->project->datatable->fieldList['teamCount']['width'] = '40';
|
||||
$config->project->datatable->fieldList['teamCount']['width'] = '70';
|
||||
$config->project->datatable->fieldList['teamCount']['required'] = 'no';
|
||||
$config->project->datatable->fieldList['teamCount']['sort'] = 'no';
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ $lang->project->sv = 'SV%';
|
||||
$lang->project->ac = 'AC';
|
||||
$lang->project->cv = 'CV%';
|
||||
$lang->project->teamCount = 'Team';
|
||||
$lang->project->longTime = 'Long-Term Project';
|
||||
$lang->project->longTime = 'Long-Term Program';
|
||||
$lang->project->future = 'TBD';
|
||||
$lang->project->moreProject = 'More Project';
|
||||
$lang->project->days = 'Manntage';
|
||||
|
||||
@@ -91,7 +91,7 @@ $lang->project->sv = 'SV%';
|
||||
$lang->project->ac = 'AC';
|
||||
$lang->project->cv = 'CV%';
|
||||
$lang->project->teamCount = 'Team';
|
||||
$lang->project->longTime = 'Long-Term Project';
|
||||
$lang->project->longTime = 'Long-Term Program';
|
||||
$lang->project->future = 'TBD';
|
||||
$lang->project->moreProject = 'More Project';
|
||||
$lang->project->days = 'Available Days';
|
||||
|
||||
@@ -91,7 +91,7 @@ $lang->project->sv = 'SV%';
|
||||
$lang->project->ac = 'AC';
|
||||
$lang->project->cv = 'CV%';
|
||||
$lang->project->teamCount = 'Team';
|
||||
$lang->project->longTime = 'Long-Term Project';
|
||||
$lang->project->longTime = 'Long-Term Program';
|
||||
$lang->project->future = 'TBD';
|
||||
$lang->project->moreProject = 'More Project';
|
||||
$lang->project->days = 'Available Days';
|
||||
|
||||
@@ -91,7 +91,7 @@ $lang->project->sv = 'SV%';
|
||||
$lang->project->ac = 'AC';
|
||||
$lang->project->cv = 'CV%';
|
||||
$lang->project->teamCount = 'Team';
|
||||
$lang->project->longTime = 'Long-Term Project';
|
||||
$lang->project->longTime = 'Long-Term Program';
|
||||
$lang->project->future = 'TBD';
|
||||
$lang->project->moreProject = 'More Project';
|
||||
$lang->project->days = 'Available Days';
|
||||
|
||||
@@ -51,7 +51,7 @@ foreach($projects as $project)
|
||||
?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<?php echo html::a(helper::createLink('project', 'browse', 'programID=0&browseType=all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->project->all, '', 'class="not-list-item"'); ?>
|
||||
<?php //echo html::a(helper::createLink('project', 'browse', 'programID=0&browseType=all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->project->all, '', 'class="not-list-item"'); ?>
|
||||
<a class='pull-right toggle-right-col not-list-item'><?php echo $lang->project->doneProjects?><i class='icon icon-angle-right'></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4" class="text-center form-actions">
|
||||
<td colspan="7" class="text-center form-actions">
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton();?>
|
||||
</td>
|
||||
|
||||
@@ -60,11 +60,11 @@
|
||||
<?php foreach($projectBuilds as $productID => $builds):?>
|
||||
<?php foreach($builds as $index => $build):?>
|
||||
<tr data-id="<?php echo $productID;?>">
|
||||
<td class="c-id-sm text-muted"><?php echo html::a(helper::createLink('build', 'view', "buildID=$build->id"), sprintf('%03d', $build->id));?></td>
|
||||
<td class="c-id-sm text-muted"><?php echo html::a(helper::createLink('build', 'view', "buildID=$build->id"), sprintf('%03d', $build->id), '', "data-app='project'");?></td>
|
||||
<td class="c-name text-left" title='<?php echo $build->productName;?>'><?php echo $build->productName;?></td>
|
||||
<td class="c-name">
|
||||
<?php if($build->branchName) echo "<span class='label label-outline label-badge'>{$build->branchName}</span>"?>
|
||||
<?php echo html::a($this->createLink('build', 'view', "build=$build->id"), $build->name);?>
|
||||
<?php echo html::a($this->createLink('build', 'view', "build=$build->id"), $build->name, '', "data-app='project'");?>
|
||||
</td>
|
||||
<td class="c-name text-left" title='<?php echo $build->executionName;?>'><?php echo $build->executionName;?></td>
|
||||
<td class="c-url" title="<?php echo $build->scmPath?>"><?php echo strpos($build->scmPath, 'http') === 0 ? html::a($build->scmPath) : $build->scmPath;?></td>
|
||||
|
||||
+15
-9
@@ -35,25 +35,31 @@ class repo extends control
|
||||
* Common actions.
|
||||
*
|
||||
* @param int $objectID projectID|executionID
|
||||
* @param int $repoID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function commonAction($objectID)
|
||||
public function commonAction($objectID, $repoID = 0)
|
||||
{
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
/* Set repo menu group. */
|
||||
$this->scm = $this->app->loadClass('scm');
|
||||
$this->repos = $this->repo->getRepoPairs($objectID);
|
||||
if(empty($this->repos) and $this->methodName != 'create') die(js::locate($this->repo->createLink('create', "objectID=$objectID")));
|
||||
$openApp = $this->app->openApp;
|
||||
$this->repos = $this->repo->getRepoPairs($openApp, $objectID);
|
||||
$this->scm = $this->app->loadClass('scm');
|
||||
|
||||
if($openApp == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($objectID);
|
||||
}
|
||||
else if($this->app->openApp == 'execution')
|
||||
else if($openApp == 'execution')
|
||||
{
|
||||
$executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode');
|
||||
$this->execution->setMenu($executions, $objectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->repo->setMenu($this->repos, $repoID);
|
||||
}
|
||||
|
||||
if(empty($this->repos) and $this->methodName != 'create') die(js::locate($this->repo->createLink('create', "objectID=$objectID")));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,7 +124,7 @@ class repo extends control
|
||||
$this->view->position[] = $this->lang->repo->create;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noempty|nodeleted');
|
||||
$this->view->products = $this->loadModel('product')->getProductPairsByProject($this->projectID);
|
||||
$this->view->products = $this->loadModel('product')->getProductPairsByProject($objectID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -285,18 +285,19 @@ class repoModel extends model
|
||||
/**
|
||||
* Get repo pairs.
|
||||
*
|
||||
* @param string $type project|execution|repo
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getRepoPairs($projectID = 0)
|
||||
public function getRepoPairs($type, $projectID = 0)
|
||||
{
|
||||
$repos = $this->dao->select('*')->from(TABLE_REPO)
|
||||
->where('deleted')->eq(0)
|
||||
->fetchAll();
|
||||
|
||||
/* Get products. */
|
||||
$productIdList = $this->loadModel('product')->getProductIDByProject($projectID, false);
|
||||
$productIdList = ($type == 'project' or $type == 'execution') ? $this->loadModel('product')->getProductIDByProject($projectID, false) : array();
|
||||
|
||||
$repoPairs = array();
|
||||
foreach($repos as $repo)
|
||||
@@ -305,7 +306,7 @@ class repoModel extends model
|
||||
$scm = $repo->SCM == 'Subversion' ? 'svn' : 'git';
|
||||
if($this->checkPriv($repo))
|
||||
{
|
||||
if($projectID)
|
||||
if($type == 'project' or $type == 'execution')
|
||||
{
|
||||
foreach($productIdList as $productID)
|
||||
{
|
||||
|
||||
@@ -478,8 +478,8 @@ class task extends control
|
||||
$this->loadModel('my')->setMenu();
|
||||
$moduleIndex = array_search('task', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->lang->task->menu = $this->lang->my->workMenu;
|
||||
$this->lang->my->menu->myWork['subModule'] = 'task';
|
||||
$this->lang->task->menu = $this->lang->my->menu->work;
|
||||
$this->lang->my->menu->work['subModule'] = 'task';
|
||||
|
||||
$this->view->position[] = html::a($this->createLink('my', 'task'), $this->lang->my->task);
|
||||
$this->view->title = $this->lang->task->batchEdit;
|
||||
|
||||
@@ -810,8 +810,8 @@ class testcase extends control
|
||||
|
||||
/* The cases of my. */
|
||||
$this->loadModel('my')->setMenu();
|
||||
$this->lang->testcase->menu = $this->lang->my->workMenu;
|
||||
$this->lang->my->menu->myWork['subModule'] = 'testcase';
|
||||
$this->lang->testcase->menu = $this->lang->my->menu->work;
|
||||
$this->lang->my->menu->work['subModule'] = 'testcase';
|
||||
|
||||
$this->view->position[] = html::a($this->server->http_referer, $this->lang->my->testCase);
|
||||
$this->view->title = $this->lang->testcase->batchEdit;
|
||||
|
||||
@@ -1094,8 +1094,8 @@ class testtask extends control
|
||||
/* The case of my. */
|
||||
else
|
||||
{
|
||||
$this->lang->testtask->menu = $this->lang->my->workMenu;
|
||||
$this->lang->my->menu->myWork['subModule'] = 'testtask';
|
||||
$this->lang->testtask->menu = $this->lang->my->menu->work;
|
||||
$this->lang->my->menu->work['subModule'] = 'testtask';
|
||||
|
||||
$this->view->title = $this->lang->testtask->batchRun;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user