* Rename openApp to tab.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* The config entry point of zentaopms
|
||||
* Version 1
|
||||
*/
|
||||
class configEntry extends entry
|
||||
class configEntry extends baseEntry
|
||||
{
|
||||
public function get($name)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* The configs entry point of zentaopms
|
||||
* Version 1
|
||||
*/
|
||||
class configsEntry extends entry
|
||||
class configsEntry extends baseEntry
|
||||
{
|
||||
public function get()
|
||||
{
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ $filter->default->cookie['lang'] = 'reg::lang';
|
||||
$filter->default->cookie['theme'] = 'reg::word';
|
||||
$filter->default->cookie['fingerprint'] = 'reg::word';
|
||||
$filter->default->cookie['hideMenu'] = 'equal::true';
|
||||
$filter->default->cookie['openApp'] = 'reg::word';
|
||||
$filter->default->cookie['tab'] = 'reg::word';
|
||||
$filter->default->cookie['goback'] = 'reg::any';
|
||||
|
||||
$filter->my = new stdclass();
|
||||
|
||||
@@ -197,6 +197,7 @@ class api extends router
|
||||
|
||||
$entryName = $this->entry . 'Entry';
|
||||
$entry = new $entryName();
|
||||
|
||||
call_user_func_array(array($entry, $this->action), $this->params);
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ class baseRouter
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public $openApp;
|
||||
public $tab;
|
||||
|
||||
/**
|
||||
* 用户使用的主题。
|
||||
@@ -600,7 +600,7 @@ class baseRouter
|
||||
$this->get = new super('get');
|
||||
$this->server = new super('server');
|
||||
$this->cookie = new super('cookie');
|
||||
$this->session = new super('session', $this->openApp);
|
||||
$this->session = new super('session', $this->tab);
|
||||
|
||||
unset($GLOBALS);
|
||||
unset($_REQUEST);
|
||||
@@ -880,14 +880,14 @@ class baseRouter
|
||||
*/
|
||||
public function setOpenApp()
|
||||
{
|
||||
if(isset($_COOKIE['openApp']) and $_COOKIE['openApp'])
|
||||
if(isset($_COOKIE['tab']) and $_COOKIE['tab'])
|
||||
{
|
||||
$this->openApp = $_COOKIE['openApp'];
|
||||
$this->tab = $_COOKIE['tab'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$module = $this->rawModule;
|
||||
$this->openApp = isset($this->lang->navGroup->$module) ? $this->lang->navGroup->$module : 'my';
|
||||
$module = $this->rawModule;
|
||||
$this->tab = isset($this->lang->navGroup->$module) ? $this->lang->navGroup->$module : 'my';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2494,22 +2494,23 @@ class super
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($scope, $openApp = '')
|
||||
public function __construct($scope, $tab = '')
|
||||
{
|
||||
$this->scope = $scope;
|
||||
$this->openApp = $openApp;
|
||||
$this->scope = $scope;
|
||||
$this->tab = $tab;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置超级变量的成员值。
|
||||
* Set one member value.
|
||||
*
|
||||
* @param string the key
|
||||
* @param mixed $value the value
|
||||
* @param string $key the key
|
||||
* @param mixed $value the value
|
||||
* @param string $tab
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function set($key, $value, $openApp = '')
|
||||
public function set($key, $value, $tab = '')
|
||||
{
|
||||
if($this->scope == 'post')
|
||||
{
|
||||
@@ -2529,7 +2530,7 @@ class super
|
||||
}
|
||||
elseif($this->scope == 'session')
|
||||
{
|
||||
if($openApp) $_SESSION["app-$openApp"][$key] = $value;
|
||||
if($tab) $_SESSION["app-$tab"][$key] = $value;
|
||||
$_SESSION[$key] = $value;
|
||||
}
|
||||
elseif($this->scope == 'env')
|
||||
@@ -2577,8 +2578,8 @@ class super
|
||||
}
|
||||
elseif($this->scope == 'session')
|
||||
{
|
||||
$openApp = $this->openApp;
|
||||
if($openApp and isset($_SESSION["app-$openApp"][$key])) return $_SESSION["app-$openApp"][$key];
|
||||
$tab = $this->tab;
|
||||
if($tab and isset($_SESSION["app-$tab"][$key])) return $_SESSION["app-$tab"][$key];
|
||||
if(isset($_SESSION[$key])) return $_SESSION[$key];
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -496,7 +496,7 @@ class baseHTML
|
||||
$label = $lang->goback;
|
||||
}
|
||||
|
||||
$tab = $_COOKIE['openApp'];
|
||||
$tab = $_COOKIE['tab'];
|
||||
$referer = strtolower($_SERVER['HTTP_REFERER']);
|
||||
$refererParts = parse_url($referer);
|
||||
$refererLink = $config->requestType == 'PATH_INFO' ? $refererParts['path'] : $refererParts['query'];
|
||||
|
||||
@@ -68,9 +68,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$openApp = '';
|
||||
if($action->objectType == 'meeting') $openApp = $action->project ? "data-app='project'" : "data-app='my'";
|
||||
echo html::a($this->createLink($module, $methodName, $params), $action->objectName, '_self', "title={$action->objectName} $openApp");
|
||||
$tab = '';
|
||||
if($action->objectType == 'meeting') $tab = $action->project ? "data-app='project'" : "data-app='my'";
|
||||
echo html::a($this->createLink($module, $methodName, $params), $action->objectName, '_self', "title={$action->objectName} $tab");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -58,11 +58,11 @@
|
||||
<li><?php common::printIcon('project', 'group', "projectID=$project->id", $project, 'button', 'group', '', '', '', '', '', $project->id);?></li>
|
||||
<li><?php common::printIcon('project', 'manageMembers', "projectID=$project->id", $project, 'button', 'persons', '', '', '', '', '', $project->id);?></li>
|
||||
<li><?php common::printicon('project', 'activate', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
|
||||
<li><?php if(common::hasPriv('project', 'edit')) echo html::a($this->createLink('project', 'edit', "projectID=$project->id"), "<i class='icon-edit'></i> " . $lang->project->edit, '', "data-app='{$app->openApp}'");?></li>
|
||||
<li><?php if(common::hasPriv('project', 'edit')) echo html::a($this->createLink('project', 'edit', "projectID=$project->id"), "<i class='icon-edit'></i> " . $lang->project->edit, '', "data-app='{$app->tab}'");?></li>
|
||||
<li><?php common::printIcon('project', 'start', "projectID=$project->id", $project, 'button', ' icon-play', '', 'iframe', true);?></li>
|
||||
<li><?php common::printIcon('project', 'suspend', "projectID=$project->id", $project, 'button', ' icon-pause', '', 'iframe', true);?></li>
|
||||
<li><?php common::printIcon('project', 'close', "projectID=$project->id", $project, 'button', ' icon-off', '', 'iframe', true);?></li>
|
||||
<li><?php if(common::hasPriv('project', 'delete')) echo html::a($this->createLink('project', 'delete', "projectID=$project->id"), "<i class='icon-trash'></i> " . $lang->project->delete, 'hiddenwin', "data-app='{$app->openApp}'");?></li>
|
||||
<li><?php if(common::hasPriv('project', 'delete')) echo html::a($this->createLink('project', 'delete', "projectID=$project->id"), "<i class='icon-trash'></i> " . $lang->project->delete, 'hiddenwin', "data-app='{$app->tab}'");?></li>
|
||||
</ul>
|
||||
</li>
|
||||
</nav>
|
||||
|
||||
+23
-23
@@ -49,15 +49,15 @@ class bug extends control
|
||||
/* Get product data. */
|
||||
$products = array();
|
||||
$objectID = 0;
|
||||
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
|
||||
$tab = ($this->app->tab == 'project' or $this->app->tab == 'execution') ? $this->app->tab : 'qa';
|
||||
if(!isonlybody())
|
||||
{
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$objectID = $this->session->project;
|
||||
$products = $this->loadModel('project')->getProducts($objectID, false);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$objectID = $this->session->execution;
|
||||
$products = $this->loadModel('execution')->getProducts($objectID, false);
|
||||
@@ -66,7 +66,7 @@ class bug extends control
|
||||
{
|
||||
$products = $this->product->getPairs('', 0, 'program_asc');
|
||||
}
|
||||
if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=bug&objectID=$objectID")));
|
||||
if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$tab&activeMenu=bug&objectID=$objectID")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -301,11 +301,11 @@ class bug extends control
|
||||
$extras = str_replace(array(',', ' '), array('&', ''), $extras);
|
||||
parse_str($extras, $output);
|
||||
|
||||
if($this->app->openApp == 'execution')
|
||||
if($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($output['executionID']);
|
||||
}
|
||||
else if($this->app->openApp == 'project')
|
||||
else if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($output['projectID']);
|
||||
|
||||
@@ -397,11 +397,11 @@ class bug extends control
|
||||
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success', 'data' => $bugID));
|
||||
|
||||
if($this->app->openApp == 'execution')
|
||||
if($this->app->tab == 'execution')
|
||||
{
|
||||
$location = $this->session->bugList ? $this->session->bugList : $this->createLink('execution', 'bug', "executionID={$output['executionID']}");
|
||||
}
|
||||
elseif($this->app->openApp == 'project')
|
||||
elseif($this->app->tab == 'project')
|
||||
{
|
||||
$location = $this->createLink('project', 'bug', "projectID={$output['projectID']}");
|
||||
}
|
||||
@@ -545,7 +545,7 @@ class bug extends control
|
||||
$projects += array($projectID => $project->name);
|
||||
|
||||
/* Set project menu. */
|
||||
if($this->app->openApp == 'project') $this->project->setMenu($projectID);
|
||||
if($this->app->tab == 'project') $this->project->setMenu($projectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -724,7 +724,7 @@ class bug extends control
|
||||
if(!$bug) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$this->session->set('storyList', '', 'product');
|
||||
$this->session->set('projectList', $this->app->getURI(true) . "#app={$this->app->openApp}", 'project');
|
||||
$this->session->set('projectList', $this->app->getURI(true) . "#app={$this->app->tab}", 'project');
|
||||
$this->bug->checkBugExecutionPriv($bug);
|
||||
|
||||
/* Update action. */
|
||||
@@ -733,18 +733,18 @@ class bug extends control
|
||||
/* Set menu. */
|
||||
if(!isonlybody())
|
||||
{
|
||||
if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($bug->project);
|
||||
if($this->app->openApp == 'execution') $this->loadModel('execution')->setMenu($bug->execution);
|
||||
if($this->app->openApp == 'qa') $this->qa->setMenu($this->products, $bug->product, $bug->branch);
|
||||
if($this->app->tab == 'project') $this->loadModel('project')->setMenu($bug->project);
|
||||
if($this->app->tab == 'execution') $this->loadModel('execution')->setMenu($bug->execution);
|
||||
if($this->app->tab == 'qa') $this->qa->setMenu($this->products, $bug->product, $bug->branch);
|
||||
|
||||
if($this->app->openApp == 'devops')
|
||||
if($this->app->tab == 'devops')
|
||||
{
|
||||
$repos = $this->loadModel('repo')->getRepoPairs($bug->project);
|
||||
$this->repo->setMenu($repos);
|
||||
$this->lang->navGroup->bug = 'devops';
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'product')
|
||||
if($this->app->tab == 'product')
|
||||
{
|
||||
$this->loadModel('product')->setMenu($bug->product);
|
||||
$this->lang->product->menu->plan['subModule'] .= ',bug';
|
||||
@@ -845,10 +845,10 @@ class bug extends control
|
||||
$this->bug->checkBugExecutionPriv($bug);
|
||||
|
||||
/* Set the menu. */
|
||||
if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($bug->project);
|
||||
if($this->app->openApp == 'execution') $this->loadModel('execution')->setMenu($bug->execution);
|
||||
if($this->app->openApp == 'qa') $this->qa->setMenu($this->products, $productID, $bug->branch);
|
||||
if($this->app->openApp == 'devops')
|
||||
if($this->app->tab == 'project') $this->loadModel('project')->setMenu($bug->project);
|
||||
if($this->app->tab == 'execution') $this->loadModel('execution')->setMenu($bug->execution);
|
||||
if($this->app->tab == 'qa') $this->qa->setMenu($this->products, $productID, $bug->branch);
|
||||
if($this->app->tab == 'devops')
|
||||
{
|
||||
session_write_close();
|
||||
$repos = $this->loadModel('repo')->getRepoPairs($bug->project);
|
||||
@@ -862,11 +862,11 @@ class bug extends control
|
||||
if($bug->type != $type) unset($this->lang->bug->typeList[$type]);
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'qa')
|
||||
if($this->app->tab == 'qa')
|
||||
{
|
||||
$this->view->products = $this->config->CRProduct ? $this->products : $this->product->getPairs('noclosed');
|
||||
}
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$products = array();
|
||||
$productList = $this->config->CRProduct ? $this->product->getOrderedProducts('all', 40, $bug->project) : $this->product->getOrderedProducts('normal', 40, $bug->project);
|
||||
@@ -1078,11 +1078,11 @@ class bug extends control
|
||||
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$users = $this->user->getTeamMemberPairs($bug->project, 'project', 'nodeleted', $bug->assignedTo);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$users = $this->user->getTeamMemberPairs($bug->execution, 'execution', 'nodeleted', $bug->assignedTo);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ foreach($products as $product)
|
||||
}
|
||||
$productsPinYin = common::convert2Pinyin($productNames);
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, 0);
|
||||
$productsHtml = html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-important' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-app='{$this->app->openApp}'");
|
||||
$productsHtml = html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-important' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-app='{$this->app->tab}'");
|
||||
|
||||
foreach($products as $product)
|
||||
{
|
||||
@@ -26,7 +26,7 @@ foreach($products as $product)
|
||||
$productName .= $product->line ? zget($lines, $product->line, '') . '/' . $product->name : $product->name;
|
||||
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
|
||||
$productsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='{$this->app->openApp}'");
|
||||
$productsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='{$this->app->tab}'");
|
||||
}
|
||||
?>
|
||||
<div class="table-row">
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::canModify('product', $product)):?>
|
||||
<?php $openApp = strpos('|execution|project|qa|', $this->app->openApp) !== false ? $this->app->openApp : 'qa';?>
|
||||
<?php if($this->app->openApp != 'product') common::printLink('bug', 'create', "productID={$bug->product}&branch={$bug->branch}&extra=moduleID={$bug->module},projectID={$bug->project},executionID={$bug->execution}", "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-primary' data-app='$openApp'"); ?>
|
||||
<?php $tab = strpos('|execution|project|qa|', $this->app->tab) !== false ? $this->app->tab : 'qa';?>
|
||||
<?php if($this->app->tab != 'product') common::printLink('bug', 'create', "productID={$bug->product}&branch={$bug->branch}&extra=moduleID={$bug->module},projectID={$bug->project},executionID={$bug->execution}", "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-primary' data-app='$tab'"); ?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -69,8 +69,8 @@
|
||||
<?php
|
||||
$params = "bugID=$bug->id";
|
||||
$extraParams = "extras=bugID=$bug->id";
|
||||
if($this->app->openApp == 'project') $extraParams .= ",projectID={$bug->project}";
|
||||
if($this->app->openApp == 'execution') $extraParams .= ",executionID={$bug->execution}";
|
||||
if($this->app->tab == 'project') $extraParams .= ",projectID={$bug->project}";
|
||||
if($this->app->tab == 'execution') $extraParams .= ",executionID={$bug->execution}";
|
||||
$copyParams = "productID=$productID&branch=$bug->branch&$extraParams";
|
||||
$convertParams = "productID=$productID&branch=$bug->branch&moduleID=0&from=bug&bugID=$bug->id";
|
||||
?>
|
||||
@@ -86,9 +86,9 @@
|
||||
common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'text-danger iframe showinonlybody', true);
|
||||
common::printIcon('bug', 'activate', $params, $bug, 'button', '', '', 'text-success iframe showinonlybody', true);
|
||||
|
||||
if($this->app->openApp != 'product')
|
||||
if($this->app->tab != 'product')
|
||||
{
|
||||
common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', "data-app='" . $this->app->openApp . "'", $lang->bug->toStory);
|
||||
common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', "data-app='" . $this->app->tab . "'", $lang->bug->toStory);
|
||||
common::printIcon('bug', 'createCase', $convertParams, $bug, 'button', 'sitemap');
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
echo "<div class='divider'></div>";
|
||||
common::printIcon('bug', 'edit', $params, $bug);
|
||||
if($this->app->openApp != 'product')
|
||||
if($this->app->tab != 'product')
|
||||
{
|
||||
common::printIcon('bug', 'create', $copyParams, $bug, 'button', 'copy');
|
||||
}
|
||||
|
||||
@@ -43,21 +43,21 @@ class build extends control
|
||||
}
|
||||
|
||||
/* Set menu. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
$executions = $this->execution->getPairs($projectID);
|
||||
$executionID = empty($executionID) ? key($executions) : $executionID;
|
||||
$this->session->set('project', $projectID);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$execution = $this->execution->getByID($executionID);
|
||||
$executions = $this->execution->getPairs($execution->project);
|
||||
$this->execution->setMenu($executionID);
|
||||
$this->session->set('project', $execution->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'qa')
|
||||
elseif($this->app->tab == 'qa')
|
||||
{
|
||||
$execution = $this->execution->getByID($executionID);
|
||||
$executions = $this->execution->getPairs($execution->project);
|
||||
@@ -77,7 +77,6 @@ class build extends control
|
||||
$this->view->products = $products;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->executions = $executions;
|
||||
$this->view->openApp = $this->app->openApp;
|
||||
$this->view->lastBuild = $this->build->getLast($executionID);
|
||||
$this->view->productGroups = $productGroups;
|
||||
$this->view->users = $this->user->getPairs('nodeleted|noclosed');
|
||||
@@ -117,11 +116,11 @@ class build extends control
|
||||
$build = $this->build->getById((int)$buildID);
|
||||
|
||||
/* Set menu. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($build->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->execution->setMenu($build->execution);
|
||||
}
|
||||
@@ -217,11 +216,11 @@ class build extends control
|
||||
foreach($stages as $storyID => $stage) $stories[$storyID]->stage = $stage;
|
||||
|
||||
/* Set menu. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($build->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($build->execution);
|
||||
}
|
||||
@@ -301,7 +300,7 @@ class build extends control
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$link = $this->app->openApp == 'project' ? $this->createLink('project', 'build', "projectID=$build->project") : $this->createLink('execution', 'build', "executionID=$build->execution");
|
||||
$link = $this->app->tab == 'project' ? $this->createLink('project', 'build', "projectID=$build->project") : $this->createLink('execution', 'build', "executionID=$build->execution");
|
||||
die(js::locate($link, 'parent'));
|
||||
}
|
||||
}
|
||||
@@ -436,7 +435,7 @@ class build extends control
|
||||
die(js::locate(inlink('view', "buildID=$buildID&type=story"), 'parent'));
|
||||
}
|
||||
|
||||
$this->session->set('storyList', inlink('view', "buildID=$buildID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), $this->app->openApp);
|
||||
$this->session->set('storyList', inlink('view', "buildID=$buildID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), $this->app->tab);
|
||||
|
||||
$build = $this->build->getById($buildID);
|
||||
$product = $this->loadModel('product')->getById($build->product);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
<form class='load-indicator main-form form-ajax' id='dataform' method='post' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<?php if($openApp == 'project'):?>
|
||||
<?php if($app->tab == 'project'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->executionCommon;?></th>
|
||||
<td><?php echo html::select('execution', $executions, $executionID, "onchange='loadProducts(this.value);' class='form-control chosen' required");?></td>
|
||||
@@ -43,7 +43,7 @@
|
||||
<?php else:?>
|
||||
<td>
|
||||
<div class='input-group' id='productBox'>
|
||||
<?php printf($lang->build->noProduct, $this->createLink('execution', 'manageproducts', "executionID=$executionID&from=buildCreate", '', 'true'), $openApp);?>
|
||||
<?php printf($lang->build->noProduct, $this->createLink('execution', 'manageproducts', "executionID=$executionID&from=buildCreate", '', 'true'), $app->tab);?>
|
||||
</div>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</thead>
|
||||
<tbody class='text-center'>
|
||||
<?php $unlinkedCount = 0;?>
|
||||
<?php $objectID = $this->app->openApp == 'execution' ? $build->execution : $build->project;?>
|
||||
<?php $objectID = $this->app->tab == 'execution' ? $build->execution : $build->project;?>
|
||||
<?php foreach($allStories as $story):?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
|
||||
@@ -53,8 +53,8 @@ tbody tr td:first-child input {display: none;}
|
||||
{
|
||||
echo $this->buildOperateMenu($build, 'view');
|
||||
|
||||
if(common::hasPriv('build', 'edit')) echo html::a($this->createLink('build', 'edit', "buildID=$build->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}' data-app='{$app->openApp}'");
|
||||
if(common::hasPriv('build', 'delete')) echo html::a($this->createLink('build', 'delete', "buildID=$build->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin' data-app='{$app->openApp}'");
|
||||
if(common::hasPriv('build', 'edit')) echo html::a($this->createLink('build', 'edit', "buildID=$build->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}' data-app='{$app->tab}'");
|
||||
if(common::hasPriv('build', 'delete')) echo html::a($this->createLink('build', 'delete', "buildID=$build->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin' data-app='{$app->tab}'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -99,7 +99,7 @@ tbody tr td:first-child input {display: none;}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='text-center'>
|
||||
<?php $objectID = $this->app->openApp == 'execution' ? $build->execution : $build->project;?>
|
||||
<?php $objectID = $this->app->tab == 'execution' ? $build->execution : $build->project;?>
|
||||
<?php foreach($stories as $storyID => $story):?>
|
||||
<?php $storyLink = $this->createLink('story', 'view', "storyID=$story->id&version=0¶m=$objectID", '', true);?>
|
||||
<tr>
|
||||
|
||||
+45
-45
@@ -578,24 +578,24 @@ class commonModel extends model
|
||||
/**
|
||||
* Print upper left corner home button.
|
||||
*
|
||||
* @param string $openApp
|
||||
* @param string $tab
|
||||
* @static
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public static function printHomeButton($openApp)
|
||||
public static function printHomeButton($tab)
|
||||
{
|
||||
global $lang;
|
||||
global $config;
|
||||
|
||||
if(!$openApp) return;
|
||||
$icon = zget($lang->navIcons, $openApp, '');
|
||||
if(!$tab) return;
|
||||
$icon = zget($lang->navIcons, $tab, '');
|
||||
|
||||
if(!in_array($openApp, array('program', 'product', 'project')))
|
||||
if(!in_array($tab, array('program', 'product', 'project')))
|
||||
{
|
||||
$nav = $lang->mainNav->$openApp;
|
||||
$nav = $lang->mainNav->$tab;
|
||||
list($title, $currentModule, $currentMethod, $vars) = explode('|', $nav);
|
||||
if($openApp == 'execution')
|
||||
if($tab == 'execution')
|
||||
{
|
||||
if($config->systemMode == 'new') $currentMethod = 'executionKanban';
|
||||
if($config->systemMode == 'classic') $currentMethod = 'all';
|
||||
@@ -603,15 +603,15 @@ class commonModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
$currentModule = $openApp;
|
||||
if($openApp == 'program' or $openApp == 'project') $currentMethod = 'browse';
|
||||
if($openApp == 'product') $currentMethod = 'all';
|
||||
$currentModule = $tab;
|
||||
if($tab == 'program' or $tab == 'project') $currentMethod = 'browse';
|
||||
if($tab == 'product') $currentMethod = 'all';
|
||||
}
|
||||
|
||||
if($config->systemMode == 'classic' and $openApp == 'execution') $icon = zget($lang->navIcons, 'project', '');
|
||||
if($config->systemMode == 'classic' and $tab == 'execution') $icon = zget($lang->navIcons, 'project', '');
|
||||
$link = helper::createLink($currentModule, $currentMethod);
|
||||
$className = $openApp == 'devops' ? 'btn num' : 'btn';
|
||||
$html = $link ? html::a($link, "$icon {$lang->$openApp->common}", '', "class='$className' style='padding-top: 2px'") : "$icon {$lang->$openApp->common}";
|
||||
$className = $tab == 'devops' ? 'btn num' : 'btn';
|
||||
$html = $link ? html::a($link, "$icon {$lang->$tab->common}", '', "class='$className' style='padding-top: 2px'") : "$icon {$lang->$tab->common}";
|
||||
|
||||
echo "<div class='btn-group header-btn'>" . $html . '</div>';
|
||||
}
|
||||
@@ -702,11 +702,11 @@ class commonModel extends model
|
||||
{
|
||||
global $app, $lang, $config;
|
||||
|
||||
/* Set main menu by openApp and module. */
|
||||
/* Set main menu by app tab and module. */
|
||||
self::setMainMenu();
|
||||
|
||||
$activeMenu = '';
|
||||
$openApp = $app->openApp;
|
||||
$tab = $app->tab;
|
||||
|
||||
$isTutorialMode = commonModel::isTutorialMode();
|
||||
$currentModule = $app->rawModule;
|
||||
@@ -756,7 +756,7 @@ class commonModel extends model
|
||||
$target = '';
|
||||
$module = '';
|
||||
$method = '';
|
||||
$link = commonModel::createMenuLink($menuItem, $openApp);
|
||||
$link = commonModel::createMenuLink($menuItem, $tab);
|
||||
if(is_array($menuItem->link))
|
||||
{
|
||||
if(isset($menuItem->link['target'])) $target = $menuItem->link['target'];
|
||||
@@ -805,7 +805,7 @@ class commonModel extends model
|
||||
$subActive = 'active';
|
||||
$label = $subLabel;
|
||||
}
|
||||
$dropMenu .= "<li class='$subActive' data-id='$subLabel'>" . html::a($subLink, $subLabel, '', "data-app='$openApp'") . '</li>';
|
||||
$dropMenu .= "<li class='$subActive' data-id='$subLabel'>" . html::a($subLink, $subLabel, '', "data-app='$tab'") . '</li>';
|
||||
}
|
||||
|
||||
if(empty($dropMenu)) continue;
|
||||
@@ -814,7 +814,7 @@ class commonModel extends model
|
||||
$dropMenu = "<ul class='dropdown-menu'>{$dropMenu}</ul>";
|
||||
}
|
||||
|
||||
$misc = (isset($lang->navGroup->$module) and $openApp != $lang->navGroup->$module) ? "data-app='$openApp'" : '';
|
||||
$misc = (isset($lang->navGroup->$module) and $tab != $lang->navGroup->$module) ? "data-app='$tab'" : '';
|
||||
$menuItemHtml = "<li class='$class $active' data-id='$menuItem->name'>" . html::a($link, $label, $target, $misc) . $dropMenu . "</li>\n";
|
||||
|
||||
echo $menuItemHtml;
|
||||
@@ -876,9 +876,9 @@ class commonModel extends model
|
||||
$moduleName = $app->rawModule;
|
||||
$methodName = $app->rawMethod;
|
||||
|
||||
$openApp = $app->openApp;
|
||||
$tab = $app->tab;
|
||||
|
||||
if(!isset($lang->$openApp->menu))
|
||||
if(!isset($lang->$tab->menu))
|
||||
{
|
||||
echo "<ul></ul>";
|
||||
return;
|
||||
@@ -937,7 +937,7 @@ class commonModel extends model
|
||||
$target = '';
|
||||
$module = '';
|
||||
$method = '';
|
||||
$link = commonModel::createMenuLink($menuItem, $openApp);
|
||||
$link = commonModel::createMenuLink($menuItem, $tab);
|
||||
if(is_array($menuItem->link))
|
||||
{
|
||||
if(isset($menuItem->link['target'])) $target = $menuItem->link['target'];
|
||||
@@ -968,7 +968,7 @@ class commonModel extends model
|
||||
|
||||
if($currentModule == strtolower($subModule) && $currentMethod == strtolower($subMethod)) $subActive = 'active';
|
||||
|
||||
$misc = (isset($lang->navGroup->$subModule) and $openApp != $lang->navGroup->$subModule) ? "data-app='$openApp'" : '';
|
||||
$misc = (isset($lang->navGroup->$subModule) and $tab != $lang->navGroup->$subModule) ? "data-app='$tab'" : '';
|
||||
$dropMenu .= "<li class='$subActive' data-id='$dropMenuItem->name'>" . html::a($subLink, $subLabel, '', $misc) . '</li>';
|
||||
}
|
||||
|
||||
@@ -978,7 +978,7 @@ class commonModel extends model
|
||||
$dropMenu = "<ul class='dropdown-menu'>{$dropMenu}</ul>";
|
||||
}
|
||||
|
||||
$misc = (isset($lang->navGroup->$module) and $openApp != $lang->navGroup->$module) ? "data-app='$openApp'" : '';
|
||||
$misc = (isset($lang->navGroup->$module) and $tab != $lang->navGroup->$module) ? "data-app='$tab'" : '';
|
||||
$menuItemHtml = "<li class='$class $active' data-id='$menuItem->name'>" . html::a($link, $label, $target, $misc) . $dropMenu . "</li>\n";
|
||||
|
||||
if($isMobile) $menuItemHtml = html::a($link, $menuItem->text, $target, $misc . " class='$class $active'") . "\n";
|
||||
@@ -1134,7 +1134,7 @@ class commonModel extends model
|
||||
$className = 'header';
|
||||
}
|
||||
$link = helper::createLink($module, $method, sprintf($vars, $orderBy));
|
||||
echo $isMobile ? html::a($link, $label, '', "class='$className' data-app={$app->openApp}") : html::a($link, $label, '', "class='$className' data-app={$app->openApp}");
|
||||
echo $isMobile ? html::a($link, $label, '', "class='$className' data-app={$app->tab}") : html::a($link, $label, '', "class='$className' data-app={$app->tab}");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1161,7 +1161,7 @@ class commonModel extends model
|
||||
{
|
||||
/* Add data-app attribute. */
|
||||
global $app;
|
||||
if(strpos($misc, 'data-app') === false) $misc .= ' data-app="' . $app->openApp . '"';
|
||||
if(strpos($misc, 'data-app') === false) $misc .= ' data-app="' . $app->tab . '"';
|
||||
|
||||
if(!commonModel::hasPriv($module, $method, $object)) return false;
|
||||
echo html::a(helper::createLink($module, $method, $vars, '', $onlyBody), $label, $target, $misc, $newline);
|
||||
@@ -1255,7 +1255,7 @@ EOD;
|
||||
global $app, $lang, $config;
|
||||
|
||||
/* Add data-app attribute. */
|
||||
if(strpos($misc, 'data-app') === false) $misc .= ' data-app="' . $app->openApp . '"';
|
||||
if(strpos($misc, 'data-app') === false) $misc .= ' data-app="' . $app->tab . '"';
|
||||
|
||||
/* Judge the $method of $module clickable or not, default is clickable. */
|
||||
$clickable = true;
|
||||
@@ -1469,7 +1469,7 @@ EOD;
|
||||
global $lang, $app;
|
||||
if(isonlybody()) return false;
|
||||
|
||||
$moduleName = ($app->getModuleName() == 'story' and $app->openApp == 'project') ? 'projectstory' : $app->getModuleName();
|
||||
$moduleName = ($app->getModuleName() == 'story' and $app->tab == 'project') ? 'projectstory' : $app->getModuleName();
|
||||
echo "<nav class='container'>";
|
||||
if(isset($preAndNext->pre) and $preAndNext->pre)
|
||||
{
|
||||
@@ -1478,7 +1478,7 @@ EOD;
|
||||
$title = '#' . $preAndNext->pre->$id . ' ' . $title . ' ' . $lang->preShortcutKey;
|
||||
|
||||
$link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->pre->$id) : helper::createLink($moduleName, 'view', "ID={$preAndNext->pre->$id}");
|
||||
$link .= '#app=' . $app->openApp;
|
||||
$link .= '#app=' . $app->tab;
|
||||
if(isset($preAndNext->pre->objectType) and $preAndNext->pre->objectType == 'doc')
|
||||
{
|
||||
echo html::a('javascript:void(0)', '<i class="icon-pre icon-chevron-left"></i>', '', "id='prevPage' class='btn' title='{$title}' data-url='{$link}'");
|
||||
@@ -1494,7 +1494,7 @@ EOD;
|
||||
$title = isset($preAndNext->next->title) ? $preAndNext->next->title : $preAndNext->next->name;
|
||||
$title = '#' . $preAndNext->next->$id . ' ' . $title . ' ' . $lang->nextShortcutKey;
|
||||
$link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->next->$id) : helper::createLink($moduleName, 'view', "ID={$preAndNext->next->$id}");
|
||||
$link .= '#app=' . $app->openApp;
|
||||
$link .= '#app=' . $app->tab;
|
||||
if(isset($preAndNext->next->objectType) and $preAndNext->next->objectType == 'doc')
|
||||
{
|
||||
echo html::a('javascript:void(0)', '<i class="icon-pre icon-chevron-right"></i>', '', "id='nextPage' class='btn' title='$title' data-url='{$link}'");
|
||||
@@ -1679,7 +1679,7 @@ EOD;
|
||||
$objectList[$id] = $object;
|
||||
}
|
||||
|
||||
$this->session->set($objectIdListKey, array('sql' => $sql, 'objectList' => $objectList), $this->app->openApp);
|
||||
$this->session->set($objectIdListKey, array('sql' => $sql, 'objectList' => $objectList), $this->app->tab);
|
||||
$existsObjectList = $this->session->$objectIdListKey;
|
||||
}
|
||||
|
||||
@@ -1741,8 +1741,8 @@ EOD;
|
||||
$queryCondition = trim($queryCondition);
|
||||
if(empty($queryCondition)) $queryCondition = "1=1";
|
||||
|
||||
$this->session->set($objectType . 'QueryCondition', $queryCondition, $this->app->openApp);
|
||||
$this->session->set($objectType . 'OnlyCondition', $onlyCondition, $this->app->openApp);
|
||||
$this->session->set($objectType . 'QueryCondition', $queryCondition, $this->app->tab);
|
||||
$this->session->set($objectType . 'OnlyCondition', $onlyCondition, $this->app->tab);
|
||||
|
||||
/* Set the query condition session. */
|
||||
$orderBy = explode(' ORDER BY ', $sql);
|
||||
@@ -1753,8 +1753,8 @@ EOD;
|
||||
$orderBy = $orderBy[0];
|
||||
if($onlyCondition) $orderBy = str_replace('t1.', '', $orderBy);
|
||||
}
|
||||
$this->session->set($objectType . 'OrderBy', $orderBy, $this->app->openApp);
|
||||
$this->session->set($objectType . 'BrowseList', array(), $this->app->openApp);
|
||||
$this->session->set($objectType . 'OrderBy', $orderBy, $this->app->tab);
|
||||
$this->session->set($objectType . 'BrowseList', array(), $this->app->tab);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2482,24 +2482,24 @@ EOD;
|
||||
{
|
||||
global $app, $lang;
|
||||
|
||||
$openApp = $app->openApp;
|
||||
$tab = $app->tab;
|
||||
|
||||
/* If homeMenu is not exists or unset, display menu. */
|
||||
if(!isset($lang->$openApp->homeMenu))
|
||||
if(!isset($lang->$tab->homeMenu))
|
||||
{
|
||||
$lang->menu = isset($lang->$openApp->menu) ? $lang->$openApp->menu : array();
|
||||
$lang->menuOrder = isset($lang->$openApp->menuOrder) ? $lang->$openApp->menuOrder : array();
|
||||
$lang->menu = isset($lang->$tab->menu) ? $lang->$tab->menu : array();
|
||||
$lang->menuOrder = isset($lang->$tab->menuOrder) ? $lang->$tab->menuOrder : array();
|
||||
return;
|
||||
}
|
||||
|
||||
if($app->rawModule == $openApp && $app->rawMethod == 'create')
|
||||
if($app->rawModule == $tab && $app->rawMethod == 'create')
|
||||
{
|
||||
$lang->menu = $lang->$openApp->homeMenu;
|
||||
$lang->menu = $lang->$tab->homeMenu;
|
||||
return;
|
||||
}
|
||||
|
||||
/* If the method is in homeMenu, display homeMenu. */
|
||||
foreach($lang->$openApp->homeMenu as $menu)
|
||||
foreach($lang->$tab->homeMenu as $menu)
|
||||
{
|
||||
$link = is_array($menu) ? $menu['link'] : $menu;
|
||||
$params = explode('|', $link);
|
||||
@@ -2507,20 +2507,20 @@ EOD;
|
||||
|
||||
if($method == $app->rawMethod)
|
||||
{
|
||||
$lang->menu = $lang->$openApp->homeMenu;
|
||||
$lang->menu = $lang->$tab->homeMenu;
|
||||
return;
|
||||
}
|
||||
|
||||
if(isset($menu['alias']) and in_array(strtolower($app->rawMethod), explode(',', strtolower($menu['alias']))))
|
||||
{
|
||||
$lang->menu = $lang->$openApp->homeMenu;
|
||||
$lang->menu = $lang->$tab->homeMenu;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Default, display menu. */
|
||||
$lang->menu = isset($lang->$openApp->menu) ? $lang->$openApp->menu : array();
|
||||
$lang->menuOrder = isset($lang->$openApp->menuOrder) ? $lang->$openApp->menuOrder : array();
|
||||
$lang->menu = isset($lang->$tab->menu) ? $lang->$tab->menu : array();
|
||||
$lang->menuOrder = isset($lang->$tab->menuOrder) ? $lang->$tab->menuOrder : array();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,7 @@ include 'chosen.html.php';
|
||||
<div id='mainHeader'>
|
||||
<div class='container'>
|
||||
<div id='heading'>
|
||||
<?php common::printHomeButton($app->openApp);?>
|
||||
<?php common::printHomeButton($app->tab);?>
|
||||
<?php echo isset($lang->switcherMenu) ? $lang->switcherMenu : '';?>
|
||||
</div>
|
||||
<nav id='navbar'><?php $activeMenu = commonModel::printMainMenu();?></nav>
|
||||
@@ -25,7 +25,7 @@ include 'chosen.html.php';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(isset($lang->{$app->openApp}->menu->$activeMenu) and isset($lang->{$app->openApp}->menu->{$activeMenu}['subMenu'])):?>
|
||||
<?php if(isset($lang->{$app->tab}->menu->$activeMenu) and isset($lang->{$app->tab}->menu->{$activeMenu}['subMenu'])):?>
|
||||
<div id='subHeader'>
|
||||
<div class='container'>
|
||||
<div id="pageNav" class='btn-toolbar'><?php if(isset($lang->modulePageNav)) echo $lang->modulePageNav;?></div>
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
<span class='label-action'><?php echo ' ' . $action->actionLabel;?></span>
|
||||
<?php if($action->action != 'login' and $action->action != 'logout'):?>
|
||||
<span class="text"><?php echo $action->objectLabel;?></span>
|
||||
<?php $openApp = '';?>
|
||||
<?php if($action->objectType == 'meeting') $openApp = $action->project ? "data-app='project'" : "data-app='my'";?>
|
||||
<?php $tab = '';?>
|
||||
<?php if($action->objectType == 'meeting') $tab = $action->project ? "data-app='project'" : "data-app='my'";?>
|
||||
<?php
|
||||
if((isset($config->maxVersion) and strpos(",{$config->action->assetType},", ",{$action->objectType},") !== false) or empty($action->objectName))
|
||||
{
|
||||
@@ -74,7 +74,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a($action->objectLink, $action->objectName, '', $openApp);
|
||||
echo html::a($action->objectLink, $action->objectName, '', $tab);
|
||||
}
|
||||
?>
|
||||
<span class="label label-id"><?php echo $action->objectID;?></span>
|
||||
|
||||
@@ -155,7 +155,7 @@ class customModel extends model
|
||||
$menuModuleName = $module;
|
||||
$order = 1;
|
||||
$customMenuMap = array();
|
||||
$openApp = $app->openApp;
|
||||
$tab = $app->tab;
|
||||
$isTutorialMode = commonModel::isTutorialMode();
|
||||
|
||||
if($customMenu)
|
||||
@@ -316,14 +316,14 @@ class customModel extends model
|
||||
ksort($menu, SORT_NUMERIC);
|
||||
|
||||
/* Set divider in main and module menu. */
|
||||
if(!isset($lang->$openApp->menuOrder)) $lang->$openApp->menuOrder = array();
|
||||
ksort($lang->$openApp->menuOrder, SORT_NUMERIC);
|
||||
if(!isset($lang->$tab->menuOrder)) $lang->$tab->menuOrder = array();
|
||||
ksort($lang->$tab->menuOrder, SORT_NUMERIC);
|
||||
|
||||
$group = 0;
|
||||
$dividerOrders = array();
|
||||
foreach($lang->$openApp->menuOrder as $name)
|
||||
foreach($lang->$tab->menuOrder as $name)
|
||||
{
|
||||
if(isset($lang->$openApp->dividerMenu) and strpos($lang->$openApp->dividerMenu, ",{$name},") !== false) $group++;
|
||||
if(isset($lang->$tab->dividerMenu) and strpos($lang->$tab->dividerMenu, ",{$name},") !== false) $group++;
|
||||
$dividerOrders[$name] = $group;
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -247,7 +247,7 @@ class doc extends control
|
||||
}
|
||||
|
||||
$browseLink = $this->createLink('doc', 'index');
|
||||
if(in_array($this->app->openApp, array('product', 'project', 'execution')))
|
||||
if(in_array($this->app->tab, array('product', 'project', 'execution')))
|
||||
{
|
||||
$objectType = $lib->type;
|
||||
$objectID = $lib->{$objectType};
|
||||
@@ -296,17 +296,17 @@ class doc extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link));
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'product')
|
||||
if($this->app->tab == 'product')
|
||||
{
|
||||
$this->product->setMenu($objectID);
|
||||
unset($this->lang->product->menu->doc['subMenu']);
|
||||
}
|
||||
else if($this->app->openApp == 'project')
|
||||
else if($this->app->tab == 'project')
|
||||
{
|
||||
$this->project->setMenu($objectID);
|
||||
unset($this->lang->project->menu->doc['subMenu']);
|
||||
}
|
||||
else if($this->app->openApp == 'execution')
|
||||
else if($this->app->tab == 'execution')
|
||||
{
|
||||
$this->execution->setMenu($objectID);
|
||||
unset($this->lang->execution->menu->doc['subMenu']);
|
||||
@@ -390,22 +390,22 @@ class doc extends control
|
||||
$type = $lib->type;
|
||||
|
||||
/* Set menus. */
|
||||
if($this->app->openApp == 'product')
|
||||
if($this->app->tab == 'product')
|
||||
{
|
||||
$this->product->setMenu($objectID);
|
||||
unset($this->lang->product->menu->doc['subMenu']);
|
||||
}
|
||||
else if($this->app->openApp == 'project')
|
||||
else if($this->app->tab == 'project')
|
||||
{
|
||||
$this->project->setMenu($objectID);
|
||||
unset($this->lang->project->menu->doc['subMenu']);
|
||||
}
|
||||
else if($this->app->openApp == 'execution')
|
||||
else if($this->app->tab == 'execution')
|
||||
{
|
||||
$this->execution->setMenu($objectID);
|
||||
unset($this->lang->execution->menu->doc['subMenu']);
|
||||
}
|
||||
else if($this->app->openApp == 'my')
|
||||
else if($this->app->tab == 'my')
|
||||
{
|
||||
$this->lang->doc->menu = $this->lang->my->menu->contribute;
|
||||
$this->lang->modulePageNav = '';
|
||||
@@ -770,8 +770,8 @@ class doc extends control
|
||||
$libs = $this->doc->getLibsByObject($type, $objectID);
|
||||
$this->lang->modulePageNav = $this->doc->select($type, $objects, $objectID, $libs);
|
||||
|
||||
$openApp = strpos('doc,product,project,execution', $this->app->openApp) !== false ? $this->app->openApp : 'doc';
|
||||
if($openApp != 'doc') $this->loadModel($openApp)->setMenu($objectID);
|
||||
$tab = strpos('doc,product,project,execution', $this->app->tab) !== false ? $this->app->tab : 'doc';
|
||||
if($tab != 'doc') $this->loadModel($tab)->setMenu($objectID);
|
||||
|
||||
$table = $this->config->objectTables[$type];
|
||||
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
$(function()
|
||||
{
|
||||
if(openApp != 'doc') return;
|
||||
if(tab != 'doc') return;
|
||||
|
||||
$('#navbar .nav li').removeClass('active');
|
||||
$("#navbar .nav li[data-id=" + type + ']').addClass('active');
|
||||
|
||||
+19
-19
@@ -1828,7 +1828,7 @@ class docModel extends model
|
||||
$class = strpos($this->config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';
|
||||
$icon = zget($this->config->doc->iconList, $typeKey);
|
||||
$html .= "<li>";
|
||||
$html .= html::a(helper::createLink('doc', 'create', "objectType=$objectType&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey", '', $class ? true : false), "<i class='icon-$icon icon'></i> " . $typeName, '', "class='$class' data-app='{$this->app->openApp}'");
|
||||
$html .= html::a(helper::createLink('doc', 'create', "objectType=$objectType&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey", '', $class ? true : false), "<i class='icon-$icon icon'></i> " . $typeName, '', "class='$class' data-app='{$this->app->tab}'");
|
||||
$html .= "</li>";
|
||||
if($typeKey == 'url') $html .= '<li class="divider"></li>';
|
||||
}
|
||||
@@ -1881,7 +1881,7 @@ class docModel extends model
|
||||
if($doc->type == 'project') $objectID = $doc->project;
|
||||
if($doc->type == 'execution') $objectID = $doc->execution;
|
||||
|
||||
$tab = $this->app->openApp;
|
||||
$tab = $this->app->tab;
|
||||
if($tab != 'doc') $tab = $objectID ? $doc->type : 'doc';
|
||||
|
||||
$html .= '<li>' . html::a(inlink('objectLibs', "type={$doc->type}&objectID=$objectID&libID={$doc->lib}&docID={$doc->id}"), "<i class='icon icon-file-text'></i> " . $doc->title, '', "data-app='$tab' title='{$doc->title}'") . '</li>';
|
||||
@@ -1911,8 +1911,8 @@ class docModel extends model
|
||||
public function buildBrowseSwitch($type, $objectID, $viewType)
|
||||
{
|
||||
$html = "<div class='btn-group'>";
|
||||
$html .= html::a(inlink('showFiles', "type=$type&objectID=$objectID&viewType=card"), "<i class='icon icon-cards-view'></i>", '', "title={$this->lang->doc->browseTypeList['grid']} class='btn btn-icon" . ($viewType != 'list' ? ' text-primary' : '') . "' data-app='{$this->app->openApp}'");
|
||||
$html .= html::a(inlink('showFiles', "type=$type&objectID=$objectID&viewType=list"), "<i class='icon icon-bars'></i>" , '', "title={$this->lang->doc->browseTypeList['list']} class='btn btn-icon" . ($viewType == 'list' ? ' text-primary' : '') . "' data-app='{$this->app->openApp}'");
|
||||
$html .= html::a(inlink('showFiles', "type=$type&objectID=$objectID&viewType=card"), "<i class='icon icon-cards-view'></i>", '', "title={$this->lang->doc->browseTypeList['grid']} class='btn btn-icon" . ($viewType != 'list' ? ' text-primary' : '') . "' data-app='{$this->app->tab}'");
|
||||
$html .= html::a(inlink('showFiles', "type=$type&objectID=$objectID&viewType=list"), "<i class='icon icon-bars'></i>" , '', "title={$this->lang->doc->browseTypeList['list']} class='btn btn-icon" . ($viewType == 'list' ? ' text-primary' : '') . "' data-app='{$this->app->tab}'");
|
||||
$html .= "</div>";
|
||||
|
||||
return $html;
|
||||
@@ -1990,13 +1990,13 @@ class docModel extends model
|
||||
$output = '';
|
||||
$closedObjectsHtml = '';
|
||||
$closedObjects = array();
|
||||
$maxHeight = (in_array($type, array('project','execution')) and $this->app->openApp == 'doc') ? '260px' : '290px';
|
||||
$class = (in_array($type, array('project','execution')) and $this->app->openApp == 'doc') ? 'col-left' : '';
|
||||
$maxHeight = (in_array($type, array('project','execution')) and $this->app->tab == 'doc') ? '260px' : '290px';
|
||||
$class = (in_array($type, array('project','execution')) and $this->app->tab == 'doc') ? 'col-left' : '';
|
||||
|
||||
$currentMethod = $this->app->getMethodName();
|
||||
$methodName = in_array($currentMethod, array('tablecontents', 'showfiles')) ? 'tablecontents' : 'objectLibs';
|
||||
|
||||
if($this->app->openApp == 'doc' and $type != 'custom' and $type != 'book')
|
||||
if($this->app->tab == 'doc' and $type != 'custom' and $type != 'book')
|
||||
{
|
||||
$objectTitle = $type == 'execution' ? substr($objects[$objectID], strpos($objects[$objectID], '/') + 1) : $objects[$objectID];
|
||||
|
||||
@@ -2018,7 +2018,7 @@ class docModel extends model
|
||||
<div class='table-col $class'>
|
||||
<div class='list-group' style='max-height: $maxHeight'>
|
||||
EOT;
|
||||
if(in_array($type, array('project','execution')) and $this->app->openApp == 'doc')
|
||||
if(in_array($type, array('project','execution')) and $this->app->tab == 'doc')
|
||||
{
|
||||
$closedObjects = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in(array_keys($objects))->andWhere('status')->eq('closed')->fetchPairs();
|
||||
}
|
||||
@@ -2028,15 +2028,15 @@ EOT;
|
||||
$selected = $key == $objectID ? 'selected' : '';
|
||||
if(isset($closedObjects[$key]))
|
||||
{
|
||||
$closedObjectsHtml .= html::a(inlink($methodName, "type=$type&objectID=$key"), $object, '', "class='$selected' title='$object' data-app='{$this->app->openApp}'");
|
||||
$closedObjectsHtml .= html::a(inlink($methodName, "type=$type&objectID=$key"), $object, '', "class='$selected' title='$object' data-app='{$this->app->tab}'");
|
||||
if($selected == 'selected') $tabActive = 'closed';
|
||||
}
|
||||
else
|
||||
{
|
||||
$output .= html::a(inlink($methodName, "type=$type&objectID=$key"), $object, '', "class='$selected' title='$object' data-app='{$this->app->openApp}'");
|
||||
$output .= html::a(inlink($methodName, "type=$type&objectID=$key"), $object, '', "class='$selected' title='$object' data-app='{$this->app->tab}'");
|
||||
}
|
||||
}
|
||||
if(in_array($type, array('project','execution')) and $this->app->openApp == 'doc')
|
||||
if(in_array($type, array('project','execution')) and $this->app->tab == 'doc')
|
||||
{
|
||||
$output .= <<<EOT
|
||||
</div>
|
||||
@@ -2080,12 +2080,12 @@ EOT;
|
||||
foreach($libs as $key => $lib)
|
||||
{
|
||||
$selected = $key == $libID ? 'selected' : '';
|
||||
$output .= html::a(inlink($methodName, "type=$type&objectID=$objectID&libID=$key"), $lib->name, '', "class='$selected' data-app='{$this->app->openApp}'");
|
||||
$output .= html::a(inlink($methodName, "type=$type&objectID=$objectID&libID=$key"), $lib->name, '', "class='$selected' data-app='{$this->app->tab}'");
|
||||
}
|
||||
if($type != 'custom' and $type != 'book')
|
||||
{
|
||||
$selected = empty($libID) ? 'selected' : '';
|
||||
$output .= html::a(inlink('showFiles', "type=$type&objectID=$objectID"), $this->lang->doclib->files, '', "class='$selected' data-app='{$this->app->openApp}'");
|
||||
$output .= html::a(inlink('showFiles', "type=$type&objectID=$objectID"), $this->lang->doclib->files, '', "class='$selected' data-app='{$this->app->tab}'");
|
||||
}
|
||||
$output .= "</div></div></div></div></div>";
|
||||
}
|
||||
@@ -2156,7 +2156,7 @@ EOT;
|
||||
$treeMenu[0] .= '<span class="tail-info">' . zget($users, $doc->editedBy) . ' ' . $doc->editedDate . '</span>';
|
||||
}
|
||||
|
||||
$treeMenu[0] .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$rootID&docID={$doc->id}"), "<i class='icon icon-file-text text-muted'></i> " . $doc->title, '', "data-app='{$this->app->openApp}' class='doc-title' title='{$doc->title}'");
|
||||
$treeMenu[0] .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$rootID&docID={$doc->id}"), "<i class='icon icon-file-text text-muted'></i> " . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title' title='{$doc->title}'");
|
||||
|
||||
$treeMenu[0] .= '</li>';
|
||||
}
|
||||
@@ -2199,7 +2199,7 @@ EOT;
|
||||
{
|
||||
$treeMenu[$module->id] .= '<span class="tail-info">' . zget($users, $doc->editedBy) . ' ' . $doc->editedDate . '</span>';
|
||||
}
|
||||
$treeMenu[$module->id] .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID={$doc->id}"), "<i class='icon icon-file-text text-muted'></i> " . $doc->title, '', "data-app='{$this->app->openApp}' class='doc-title' title='{$doc->title}'");
|
||||
$treeMenu[$module->id] .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID={$doc->id}"), "<i class='icon icon-file-text text-muted'></i> " . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title' title='{$doc->title}'");
|
||||
|
||||
$treeMenu[$module->id] .= '</li>';
|
||||
}
|
||||
@@ -2286,7 +2286,7 @@ EOT;
|
||||
$objectID = $type == 'custom' or $type == 'book' ? 0 : $doclib->$type;
|
||||
}
|
||||
|
||||
$this->session->set('docList', $this->app->getURI(true), $this->app->openApp);
|
||||
$this->session->set('docList', $this->app->getURI(true), $this->app->tab);
|
||||
|
||||
$objects = $this->getOrderedObjects($type);
|
||||
|
||||
@@ -2319,14 +2319,14 @@ EOT;
|
||||
if($libID == 0) $libID = key($libs);
|
||||
$this->lang->modulePageNav = $this->select($type, $objects, $objectID, $libs, $libID);
|
||||
|
||||
if($this->app->openApp == 'doc') $this->app->rawMethod = $type;
|
||||
if($this->app->tab == 'doc') $this->app->rawMethod = $type;
|
||||
|
||||
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
if(empty($object)) die(js::locate(helper::createLink($type, 'create')));
|
||||
}
|
||||
|
||||
$openApp = strpos(',doc,product,project,execution,', ",{$this->app->openApp},") !== false ? $this->app->openApp : 'doc';
|
||||
if($openApp != 'doc') $this->loadModel($openApp)->setMenu($objectID);
|
||||
$tab = strpos(',doc,product,project,execution,', ",{$this->app->tab},") !== false ? $this->app->tab : 'doc';
|
||||
if($tab != 'doc') $this->loadModel($tab)->setMenu($objectID);
|
||||
|
||||
$this->lang->TRActions = $this->buildCollectButton4Doc();
|
||||
$this->lang->TRActions .= common::hasPriv('doc', 'create') ? $this->buildCreateButton4Doc($type, $objectID, $libID) : '';
|
||||
|
||||
@@ -29,7 +29,7 @@ $sessionString .= session_name() . '=' . session_id();
|
||||
<div class="actions">
|
||||
<?php
|
||||
echo html::a("javascript:fullScreen()", '<i class="icon-fullscreen"></i>', '', "title='{$lang->fullscreen}' class='btn btn-link fullscreen-btn'");
|
||||
if(common::hasPriv('doc', 'edit')) echo html::a(inlink('edit', "docID=$doc->id&comment=false&objectType=$objectType&objectID=$object->id&libID=$libID"), '<i class="icon-edit"></i>', '', "title='{$lang->doc->edit}' class='btn btn-link' data-app='{$this->app->openApp}'");
|
||||
if(common::hasPriv('doc', 'edit')) echo html::a(inlink('edit', "docID=$doc->id&comment=false&objectType=$objectType&objectID=$object->id&libID=$libID"), '<i class="icon-edit"></i>', '', "title='{$lang->doc->edit}' class='btn btn-link' data-app='{$this->app->tab}'");
|
||||
if(common::hasPriv('doc', 'delete'))
|
||||
{
|
||||
$deleteURL = $this->createLink('doc', 'delete', "docID=$doc->id&confirm=yes&from=lib");
|
||||
@@ -41,7 +41,7 @@ $sessionString .= session_name() . '=' . session_id();
|
||||
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $lang->doc->collect;?>" class='ajaxCollect btn btn-link'><i class='icon <?php echo $star;?>'></i></a>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if(isset($this->config->maxVersion) and $this->app->openApp == 'project'):?>
|
||||
<?php if(isset($this->config->maxVersion) and $this->app->tab == 'project'):?>
|
||||
<?php
|
||||
$canImportToPracticeLib = common::hasPriv('doc', 'importToPracticeLib');
|
||||
$canImportToComponentLib = common::hasPriv('doc', 'importToComponentLib');
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'>
|
||||
<?php echo html::submitButton() . ' ' . html::backButton($lang->goback, "data-app='{$app->openApp}'");?>
|
||||
<?php echo html::submitButton() . ' ' . html::backButton($lang->goback, "data-app='{$app->tab}'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-110px'><?php echo $lang->doc->libType?></th>
|
||||
<?php if($this->app->openApp != 'doc'):?>
|
||||
<?php if($this->app->tab != 'doc'):?>
|
||||
<?php
|
||||
foreach($libTypeList as $key => $libType)
|
||||
{
|
||||
if($this->app->openApp != $key) unset($libTypeList[$key]);
|
||||
if($this->app->tab != $key) unset($libTypeList[$key]);
|
||||
}
|
||||
?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
<?php
|
||||
echo html::hidden('editedDate', $doc->editedDate);
|
||||
echo html::submitButton();
|
||||
echo html::backButton($lang->goback, "data-app='{$app->openApp}'");
|
||||
echo html::backButton($lang->goback, "data-app='{$app->tab}'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if($app->openApp == 'execution'):;?>
|
||||
<?php if($app->tab == 'execution'):;?>
|
||||
<style>.panel-body{min-height: 180px}</style>
|
||||
<?php endif;?>
|
||||
<div class="fade main-row split-row" id="mainRow">
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('type', $type);?>
|
||||
<?php js::set('openApp', $this->app->openApp);?>
|
||||
<?php js::set('tab', $this->app->tab);?>
|
||||
<script>
|
||||
<?php
|
||||
$sessionString = $config->requestType == 'PATH_INFO' ? '?' : '&';
|
||||
|
||||
@@ -94,7 +94,7 @@ if(empty($type)) $type = 'product';
|
||||
$icon = zget($this->config->doc->iconList, $typeKey);
|
||||
$class = strpos($this->config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';
|
||||
$html .= "<li>";
|
||||
$html .= html::a(helper::createLink('doc', 'create', "objectType=$type&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey", '', $class ? true : false), "<i class='icon-$icon text-muted'></i> " . $typeName, '', "class='$class' data-app='{$this->app->openApp}'");
|
||||
$html .= html::a(helper::createLink('doc', 'create', "objectType=$type&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey", '', $class ? true : false), "<i class='icon-$icon text-muted'></i> " . $typeName, '', "class='$class' data-app='{$this->app->tab}'");
|
||||
$html .= "</li>";
|
||||
if($typeKey == 'url') $html .= '<li class="divider"></li>';
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class execution extends control
|
||||
|
||||
$this->executions = $this->execution->getPairs(0, 'all', 'nocode');
|
||||
$skipCreateStep = array('computeburn', 'ajaxgetdropmenu', 'executionkanban', 'ajaxgetteammembers');
|
||||
if(!in_array($this->methodName, $skipCreateStep) and $this->app->openApp == 'execution')
|
||||
if(!in_array($this->methodName, $skipCreateStep) and $this->app->tab == 'execution')
|
||||
{
|
||||
if(!$this->executions and $this->methodName != 'index' and $this->methodName != 'create' and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('execution', 'create'));
|
||||
}
|
||||
@@ -970,7 +970,7 @@ class execution extends control
|
||||
*/
|
||||
public function testreport($executionID = 0, $objectType = 'execution', $extra = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($this->session->project);
|
||||
if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project);
|
||||
echo $this->fetch('testreport', 'browse', "objectID=$executionID&objectType=$objectType&extra=$extra&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
@@ -1210,20 +1210,20 @@ class execution extends control
|
||||
public function create($projectID = '', $executionID = '', $copyExecutionID = '', $planID = 0, $confirm = 'no', $productID = 0)
|
||||
{
|
||||
/* Set menu. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
if(!empty($copyExecutionID)) $projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($copyExecutionID)->fetch('project');
|
||||
|
||||
$projectID = $this->project->saveState($projectID, $this->project->getPairsByProgram());
|
||||
$this->project->setMenu($projectID);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$selectedExecutionID = $executionID;
|
||||
if($this->config->systemMode == 'new') $selectedExecutionID = key($this->executions);
|
||||
$this->execution->setMenu($selectedExecutionID);
|
||||
}
|
||||
elseif($this->app->openApp == 'doc')
|
||||
elseif($this->app->tab == 'doc')
|
||||
{
|
||||
unset($this->lang->doc->menu->execution['subMenu']);
|
||||
}
|
||||
@@ -1304,7 +1304,7 @@ class execution extends control
|
||||
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $executionID));
|
||||
|
||||
if($this->app->openApp == 'doc')
|
||||
if($this->app->tab == 'doc')
|
||||
{
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'objectLibs', "type=execution")));
|
||||
}
|
||||
@@ -1333,7 +1333,7 @@ class execution extends control
|
||||
$this->lang->execution->type = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->execution->type);
|
||||
}
|
||||
|
||||
$this->view->title = (($this->app->openApp == 'execution') and ($this->config->systemMode == 'new')) ? $this->lang->execution->createExec : $this->lang->execution->create;
|
||||
$this->view->title = (($this->app->tab == 'execution') and ($this->config->systemMode == 'new')) ? $this->lang->execution->createExec : $this->lang->execution->create;
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->executions = array('' => '') + $this->execution->getList($projectID);
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
@@ -1355,7 +1355,7 @@ class execution extends control
|
||||
$this->view->copyExecutionID = $copyExecutionID;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products));
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed');
|
||||
$this->view->from = $this->app->openApp;
|
||||
$this->view->from = $this->app->tab;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1522,7 +1522,7 @@ class execution extends control
|
||||
die(js::locate($this->session->executionList, 'parent'));
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->project->setMenu($this->session->project);
|
||||
$this->view->project = $this->project->getById($this->session->project);
|
||||
@@ -1567,7 +1567,7 @@ class execution extends control
|
||||
$this->view->poUsers = $poUsers;
|
||||
$this->view->qdUsers = $qdUsers;
|
||||
$this->view->rdUsers = $rdUsers;
|
||||
$this->view->from = $this->app->openApp;
|
||||
$this->view->from = $this->app->tab;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -2366,11 +2366,11 @@ class execution extends control
|
||||
$this->loadModel('product');
|
||||
|
||||
/* Get projects, executions and products. */
|
||||
$object = $this->project->getByID($objectID, $this->app->openApp == 'project' ? 'project' : 'sprint,stage');
|
||||
$object = $this->project->getByID($objectID, $this->app->tab == 'project' ? 'project' : 'sprint,stage');
|
||||
$products = $this->project->getProducts($objectID);
|
||||
$browseLink = $this->createLink($this->app->openApp == 'project' ? 'projectstory' : 'execution', 'story', "objectID=$objectID");
|
||||
$browseLink = $this->createLink($this->app->tab == 'project' ? 'projectstory' : 'execution', 'story', "objectID=$objectID");
|
||||
|
||||
$this->session->set('storyList', $this->app->getURI(true), $this->app->openApp); // Save session.
|
||||
$this->session->set('storyList', $this->app->getURI(true), $this->app->tab); // Save session.
|
||||
|
||||
/* Only execution can have no products. */
|
||||
if(empty($products))
|
||||
@@ -2860,7 +2860,7 @@ class execution extends control
|
||||
$this->app->loadLang('product');
|
||||
$this->app->loadLang('programplan');
|
||||
|
||||
$from = $this->app->openApp;
|
||||
$from = $this->app->tab;
|
||||
if($from == 'execution') $this->session->set('executionList', $this->app->getURI(true), 'execution');
|
||||
if($from == 'project')
|
||||
{
|
||||
|
||||
@@ -242,7 +242,7 @@ class executionModel extends model
|
||||
return $this->session->execution;
|
||||
}
|
||||
|
||||
if($executionID > 0) $this->session->set('execution', (int)$executionID, $this->app->openApp);
|
||||
if($executionID > 0) $this->session->set('execution', (int)$executionID, $this->app->tab);
|
||||
if($executionID == 0 and $this->cookie->lastExecution)
|
||||
{
|
||||
/* Execution link is execution-task. */
|
||||
@@ -349,7 +349,7 @@ class executionModel extends model
|
||||
}
|
||||
|
||||
/* Replace required language. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->lang->project->name = $this->lang->execution->name;
|
||||
$this->lang->project->code = $this->lang->execution->code;
|
||||
@@ -570,7 +570,7 @@ class executionModel extends model
|
||||
$codeList = array();
|
||||
|
||||
/* Replace required language. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$projectModel = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($this->session->project)->fetch('model');
|
||||
if($projectModel == 'scrum')
|
||||
@@ -1289,7 +1289,7 @@ class executionModel extends model
|
||||
{
|
||||
$link = helper::createLink($module, 'task', "executionID=%s");
|
||||
}
|
||||
elseif($module == 'bug' and $method == 'create' and $this->app->openApp == 'execution')
|
||||
elseif($module == 'bug' and $method == 'create' and $this->app->tab == 'execution')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "productID=0&branch=0&extra=executionID=%s");
|
||||
}
|
||||
@@ -1518,8 +1518,8 @@ class executionModel extends model
|
||||
if(strpos($taskQuery, "`execution` =") === false) $taskQuery = $taskQuery . " AND `execution` = $executionID";
|
||||
$executionQuery = "`execution` " . helper::dbIN(array_keys($executions));
|
||||
$taskQuery = str_replace("`execution` = 'all'", $executionQuery, $taskQuery); // Search all execution.
|
||||
$this->session->set('taskQueryCondition', $taskQuery, $this->app->openApp);
|
||||
$this->session->set('taskOnlyCondition', true, $this->app->openApp);
|
||||
$this->session->set('taskQueryCondition', $taskQuery, $this->app->tab);
|
||||
$this->session->set('taskOnlyCondition', true, $this->app->tab);
|
||||
|
||||
$tasks = $this->getSearchTasks($taskQuery, $pager, $sort);
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ foreach($executions as $projectID => $projectExecutions)
|
||||
$selected = $execution->id == $executionID ? 'selected' : '';
|
||||
if($execution->status != 'done' and $execution->status != 'closed' and ($execution->PM == $this->app->user->account or isset($execution->teams[$this->app->user->account])))
|
||||
{
|
||||
$myExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected executionName' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'") . '</li>';
|
||||
$myExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected executionName' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->tab}'") . '</li>';
|
||||
|
||||
if($selected == 'selected') $tabActive = 'myExecution';
|
||||
|
||||
@@ -83,7 +83,7 @@ foreach($executions as $projectID => $projectExecutions)
|
||||
}
|
||||
else if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM != $this->app->user->account and !isset($execution->teams[$this->app->user->account]))
|
||||
{
|
||||
$normalExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected executionName' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'") . '</li>';
|
||||
$normalExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected executionName' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->tab}'") . '</li>';
|
||||
|
||||
if($selected == 'selected') $tabActive = 'other';
|
||||
|
||||
@@ -91,7 +91,7 @@ foreach($executions as $projectID => $projectExecutions)
|
||||
}
|
||||
else if($execution->status == 'done' or $execution->status == 'closed')
|
||||
{
|
||||
$closedExecutionsHtml .= html::a(sprintf($link, $execution->id), $preFix . $execution->name, '', "class='$selected' title='" . $preFix . $execution->name . "' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'");
|
||||
$closedExecutionsHtml .= html::a(sprintf($link, $execution->id), $preFix . $execution->name, '', "class='$selected' title='" . $preFix . $execution->name . "' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->tab}'");
|
||||
|
||||
if($selected == 'selected') $tabActive = 'closed';
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<tr>
|
||||
<td class='cell-id'>
|
||||
<?php if($canBatchAssignTo):?>
|
||||
<?php echo html::checkbox('bugIDList', array($bug->id => ''), '', $arrtibute) . html::a($viewLink, sprintf('%03d', $bug->id), '', "data-app={$this->app->openApp}");?>
|
||||
<?php echo html::checkbox('bugIDList', array($bug->id => ''), '', $arrtibute) . html::a($viewLink, sprintf('%03d', $bug->id), '', "data-app={$this->app->tab}");?>
|
||||
<?php else:?>
|
||||
<?php printf('%03d', $bug->id);?>
|
||||
<?php endif;?>
|
||||
@@ -100,7 +100,7 @@
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $bug->pri?>' title='<?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?></span></td>
|
||||
<td class='text-left' title="<?php echo $bug->title?>"><?php echo html::a($viewLink, $bug->title, null, "style='color: $bug->color' data-app={$this->app->openApp}");?></td>
|
||||
<td class='text-left' title="<?php echo $bug->title?>"><?php echo html::a($viewLink, $bug->title, null, "style='color: $bug->color' data-app={$this->app->tab}");?></td>
|
||||
<td><?php echo zget($users, $bug->openedBy, $bug->openedBy);?></td>
|
||||
<td class="text-center <?php echo (isset($bug->delay) and $bug->status == 'active') ? 'delayed' : '';?>"><?php if(substr($bug->deadline, 0, 4) > 0) echo substr($bug->deadline, 5, 6);?></td>
|
||||
<td class='c-assignedTo has-btn text-left'><?php $this->bug->printAssignedHtml($bug, $users);?></td>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<?php echo html::a(inlink('testcase', "executionID=$executionID&type=$type&orderBy=$orderBy"), "<span class='text'>{$lang->execution->all}</span>", '', "class='btn btn-link btn-active-text'");?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::canModify('execution', $execution)) echo html::a(helper::createLink('testcase', 'create', "productID=$productID&branch=0&moduleID=0&from=execution¶m=$execution->id", '', '', '', true), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary' data-app='{$this->app->openApp}'");?>
|
||||
<?php if(common::canModify('execution', $execution)) echo html::a(helper::createLink('testcase', 'create', "productID=$productID&branch=0&moduleID=0&from=execution¶m=$execution->id", '', '', '', true), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary' data-app='{$this->app->tab}'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
@@ -13,7 +13,7 @@
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->testcase->noCase;?></span>
|
||||
<?php if(common::canModify('execution', $execution) and common::hasPriv('testcase', 'create')):?>
|
||||
<?php echo html::a(helper::createLink('testcase', 'create', "productID=$productID&branch=0&moduleID=0&from=execution¶m=$execution->id", '', '', '', true), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info' data-app='{$this->app->openApp}'");?>
|
||||
<?php echo html::a(helper::createLink('testcase', 'create', "productID=$productID&branch=0&moduleID=0&from=execution¶m=$execution->id", '', '', '', true), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info' data-app='{$this->app->tab}'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
@@ -49,7 +49,7 @@
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $case->pri?>' title='<?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
|
||||
<?php $params = "testcaseID=$caseID&version=$case->version";?>
|
||||
<?php if($type == 'assigntome') $params .= "&from=testtask&taskID=$case->task";?>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', $params, '', '', $case->project), $case->title, null, "style='color: $case->color' data-app='{$this->app->openApp}'");?></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', $params, '', '', $case->project), $case->title, null, "style='color: $case->color' data-app='{$this->app->tab}'");?></td>
|
||||
<td><?php echo zget($lang->testcase->typeList, $case->type);?></td>
|
||||
<td><?php echo zget($users, $case->openedBy);?></td>
|
||||
<td><?php echo zget($users, $case->lastRunner);?></td>
|
||||
|
||||
+19
-19
@@ -159,12 +159,12 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Open app
|
||||
* Open tab of app
|
||||
* @param {string} [url] Url to open
|
||||
* @param {string} [appCode] The code of target app to open
|
||||
* @return {void}
|
||||
*/
|
||||
function openApp(url, appCode)
|
||||
function openTab(url, appCode)
|
||||
{
|
||||
/* Check params */
|
||||
if(!appCode)
|
||||
@@ -222,8 +222,8 @@
|
||||
if(!url) url = appsMap[appCode].url;
|
||||
}
|
||||
|
||||
/* Set openApp cookie */
|
||||
$.cookie('openApp', appCode, {expires: config.cookieLife, path: config.webRoot});
|
||||
/* Set tab cookie */
|
||||
$.cookie('tab', appCode, {expires: config.cookieLife, path: config.webRoot});
|
||||
|
||||
/* Highlight at main menu */
|
||||
var $menuMainNav = $('#menuMainNav,#menuMoreNav');
|
||||
@@ -309,7 +309,7 @@
|
||||
* @param {string} appCode The app code of target app to hide
|
||||
* @return {void}
|
||||
*/
|
||||
function hideApp(appCode)
|
||||
function hideTab(appCode)
|
||||
{
|
||||
var app = openedApps[appCode];
|
||||
if(!app || !app.show) return;
|
||||
@@ -322,17 +322,17 @@
|
||||
|
||||
/* Active last app */
|
||||
var lastApp = getLastApp(true) || getLastApp();
|
||||
showApp(lastApp ? lastApp.code : defaultApp);
|
||||
showTab(lastApp ? lastApp.code : defaultApp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show app
|
||||
* Show tab of app
|
||||
* @param {string} appCode The app code of target app to show
|
||||
* @return {void}
|
||||
*/
|
||||
function showApp(appCode)
|
||||
function showTab(appCode)
|
||||
{
|
||||
return openApp('', appCode);
|
||||
return openTab('', appCode);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -343,8 +343,8 @@
|
||||
function toggleApp(appCode)
|
||||
{
|
||||
var app = openedApps[appCode];
|
||||
if(!app || app.code !== lastOpenedApp) showApp(appCode);
|
||||
else hideApp(appCode);
|
||||
if(!app || app.code !== lastOpenedApp) showTab(appCode);
|
||||
else hideTab(appCode);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -380,7 +380,7 @@
|
||||
}
|
||||
|
||||
app.closed = true;
|
||||
hideApp(appCode);
|
||||
hideTab(appCode);
|
||||
app.$app.remove();
|
||||
app.$bar.remove();
|
||||
delete openedApps[appCode];
|
||||
@@ -449,9 +449,9 @@
|
||||
/* Bind helper methods to global object "$.apps" */
|
||||
$.apps = window.apps =
|
||||
{
|
||||
show: showApp,
|
||||
open: openApp,
|
||||
hide: hideApp,
|
||||
show: showTab,
|
||||
open: openTab,
|
||||
hide: hideTab,
|
||||
toggle: toggleApp,
|
||||
close: closeApp,
|
||||
reload: reloadApp,
|
||||
@@ -553,7 +553,7 @@
|
||||
if($link.is('[data-modal],[data-toggle][data-toggle!="tooltip"],.iframe,.not-in-app')) return;
|
||||
var url = $link.hasClass('show-in-app') ? '' : ($link.attr('href') || $link.data('url'));
|
||||
if(url && url.indexOf('onlybody=yes') > 0) return;
|
||||
if(openApp(url, $link.data('app')))
|
||||
if(openTab(url, $link.data('app')))
|
||||
{
|
||||
e.preventDefault();
|
||||
if($link.closest('#userNav').length)
|
||||
@@ -570,7 +570,7 @@
|
||||
|
||||
var lang = window.appsLang;
|
||||
var app = openedApps[appCode];
|
||||
var items = [{label: lang.open, disabled: app && lastOpenedApp === appCode, onClick: function(){showApp(appCode)}}];
|
||||
var items = [{label: lang.open, disabled: app && lastOpenedApp === appCode, onClick: function(){showTab(appCode)}}];
|
||||
if(app)
|
||||
{
|
||||
items.push({label: lang.reload, onClick: function(){reloadApp(appCode)}});
|
||||
@@ -606,7 +606,7 @@
|
||||
|
||||
window.addEventListener('popstate', function(event)
|
||||
{
|
||||
if(event.state && lastOpenedApp !== event.state.app) openApp(event.state.app);
|
||||
if(event.state && lastOpenedApp !== event.state.app) openTab(event.state.app);
|
||||
});
|
||||
|
||||
/* Redirect or open default app after document load */
|
||||
@@ -616,7 +616,7 @@
|
||||
defaultOpenUrl = decodeURIComponent(location.hash.substr(5));
|
||||
}
|
||||
|
||||
openApp(defaultOpenUrl ? defaultOpenUrl : defaultApp);
|
||||
openTab(defaultOpenUrl ? defaultOpenUrl : defaultApp);
|
||||
|
||||
/* Refresh more menu on window resize */
|
||||
$(window).on('resize', refreshMoreMenu);
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
<span class='label-action'><?php echo ' ' . $action->actionLabel;?></span>
|
||||
<?php if($action->action != 'login' and $action->action != 'logout'):?>
|
||||
<span class="text-muted"><?php echo $action->objectLabel;?></span>
|
||||
<?php $openApp = '';?>
|
||||
<?php if($action->objectType == 'meeting') $openApp = $action->project ? "data-app='project'" : "data-app='my'";?>
|
||||
<?php $tab = '';?>
|
||||
<?php if($action->objectType == 'meeting') $tab = $action->project ? "data-app='project'" : "data-app='my'";?>
|
||||
<?php
|
||||
if((isset($config->maxVersion) and strpos($config->action->assetType, $action->objectType) !== false) or empty($action->objectName))
|
||||
{
|
||||
@@ -70,7 +70,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a($action->objectLink, $action->objectName, '', $openApp);
|
||||
echo html::a($action->objectLink, $action->objectName, '', $tab);
|
||||
}
|
||||
?>
|
||||
<span class="label label-id"><?php echo $action->objectID;?></span>
|
||||
|
||||
@@ -103,18 +103,18 @@ class personnel extends control
|
||||
*/
|
||||
public function whitelist($objectID = 0, $module = 'personnel', $objectType = 'program', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1, $programID = 0, $from = '')
|
||||
{
|
||||
if($this->app->openApp == 'program')
|
||||
if($this->app->tab == 'program')
|
||||
{
|
||||
$this->loadModel('program')->setMenu($objectID);
|
||||
}
|
||||
else if($this->app->openApp == 'project')
|
||||
else if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($objectID);
|
||||
}
|
||||
|
||||
/* Load lang and set session. */
|
||||
$this->app->loadLang('user');
|
||||
$this->app->session->set('whitelistList', $this->app->getURI(true), $this->app->openApp);
|
||||
$this->app->session->set('whitelistList', $this->app->getURI(true), $this->app->tab);
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', true);
|
||||
@@ -155,11 +155,11 @@ class personnel extends control
|
||||
*/
|
||||
public function addWhitelist($objectID = 0, $deptID = 0, $copyID = 0, $objectType = 'program', $module = 'personnel', $programID = 0, $from = '')
|
||||
{
|
||||
if($this->app->openApp == 'program')
|
||||
if($this->app->tab == 'program')
|
||||
{
|
||||
$this->loadModel('program')->setMenu($objectID);
|
||||
}
|
||||
else if($this->app->openApp == 'project')
|
||||
else if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($objectID);
|
||||
}
|
||||
@@ -174,8 +174,8 @@ class personnel extends control
|
||||
$this->loadModel('action')->create('whitelist', $objectID, 'managedWhitelist', '', $objectType);
|
||||
|
||||
$locateLink = $this->session->whitelistList ? $this->session->whitelistList : $this->createLink($module, 'whitelist', "objectID=$objectID");
|
||||
$openApp = $module == 'program' ? ($from == 'project' || $from == 'my' ? '#open=project' : '#open=program') : '';
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink . $openApp));
|
||||
$tab = $module == 'program' ? ($from == 'project' || $from == 'my' ? '#open=project' : '#open=program') : '';
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink . $tab));
|
||||
}
|
||||
|
||||
$this->loadModel('dept');
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<?php $openApp = $module == 'program' ? ($from == 'project' || $from == 'my' ? "data-group='project'" : "data-group='program'") : '';?>
|
||||
<?php $tab = $module == 'program' ? ($from == 'project' || $from == 'my' ? "data-group='project'" : "data-group='program'") : '';?>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php if($module == 'program') echo html::a($goback, $lang->goback, '', 'class="btn btn-secondary"');?>
|
||||
<?php $vars = $module == 'program' ? "objectID=$objectID&programID=$programID&module=$module&from=$from" : "objectID=$objectID";?>
|
||||
<?php echo html::a($this->createLink($module, 'whitelist', $vars), '<span class="text">' . $lang->personnel->whitelist . '</span>', '', "class='btn btn-link btn-active-text' $openApp");?>
|
||||
<?php echo html::a($this->createLink($module, 'whitelist', $vars), '<span class="text">' . $lang->personnel->whitelist . '</span>', '', "class='btn btn-link btn-active-text' $tab");?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php $vars = $module == 'program' ? "objectID=$objectID&deptID=0©ID=0&programID=$programID&from=$from" : "objectID=$objectID";?>
|
||||
<?php common::printLink($module, 'addWhitelist', $vars, "<i class='icon icon-plus'></i> " . $lang->personnel->addWhitelist, '', "class='btn btn-primary' $openApp");?>
|
||||
<?php common::printLink($module, 'addWhitelist', $vars, "<i class='icon icon-plus'></i> " . $lang->personnel->addWhitelist, '', "class='btn btn-primary' $tab");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-row fade'>
|
||||
@@ -58,7 +58,7 @@
|
||||
<td title="<?php echo $user->email;?>"><?php echo $user->email;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv($module, 'unbindWhitelist')) echo html::a($this->createLink($module, 'unbindWhitelist', "id=$user->id&confirm=no"), '<i class="icon-unlink"></i>', 'hiddenwin', "title='{$lang->personnel->delete}' class='btn' $openApp");
|
||||
if(common::hasPriv($module, 'unbindWhitelist')) echo html::a($this->createLink($module, 'unbindWhitelist', "id=$user->id&confirm=no"), '<i class="icon-unlink"></i>', 'hiddenwin', "title='{$lang->personnel->delete}' class='btn' $tab");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+18
-19
@@ -122,10 +122,10 @@ class product extends control
|
||||
*/
|
||||
public function browse($productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1, $projectID = 0)
|
||||
{
|
||||
$productID = $this->app->openApp != 'project' ? $this->product->saveState($productID, $this->products) : $productID;
|
||||
$productID = $this->app->tab != 'project' ? $this->product->saveState($productID, $this->products) : $productID;
|
||||
|
||||
if($this->app->openApp == 'product') $this->product->setMenu($productID, $branch);
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'product') $this->product->setMenu($productID, $branch);
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->session->set('storyList', $this->app->getURI(true), 'project');
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
@@ -152,19 +152,19 @@ class product extends control
|
||||
if($browseType == 'bymodule' or $browseType == '')
|
||||
{
|
||||
setcookie('storyModule', (int)$param, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
if($this->app->openApp == 'project') setcookie('storyModuleParam', (int)$param, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
if($this->app->tab == 'project') setcookie('storyModuleParam', (int)$param, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
$_COOKIE['storyBranch'] = 0;
|
||||
setcookie('storyBranch', 0, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
if($browseType == '') setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
}
|
||||
if($browseType == 'bybranch') setcookie('storyBranch', (int)$branch, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
|
||||
$cookieModule = $this->app->openApp == 'project' ? $this->cookie->storyModuleParam : $this->cookie->storyModule;
|
||||
$cookieModule = $this->app->tab == 'project' ? $this->cookie->storyModuleParam : $this->cookie->storyModule;
|
||||
$moduleID = ($browseType == 'bymodule') ? (int)$param : (($browseType == 'bysearch' or $browseType == 'bybranch') ? 0 : ($cookieModule ? $cookieModule : 0));
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
|
||||
/* Set menu. The projectstory module does not execute. */
|
||||
if($this->app->openApp == 'product')
|
||||
if($this->app->tab == 'product')
|
||||
{
|
||||
/* Save session. */
|
||||
$this->session->set('storyList', $this->app->getURI(true), 'product');
|
||||
@@ -304,7 +304,7 @@ class product extends control
|
||||
$this->view->products = $this->products;
|
||||
$this->view->projectProducts = isset($projectProducts) ? $projectProducts : array();
|
||||
$this->view->storyType = $storyType;
|
||||
$this->view->from = $this->app->openApp;
|
||||
$this->view->from = $this->app->tab;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -326,16 +326,16 @@ class product extends control
|
||||
$this->executeHooks($productID);
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $productID));
|
||||
|
||||
$openApp = $this->app->openApp;
|
||||
$moduleName = $openApp == 'program'? 'program' : $this->moduleName;
|
||||
$methodName = $openApp == 'program'? 'product' : 'browse';
|
||||
$param = $openApp == 'program' ? "programID=$programID" : "productID=$productID";
|
||||
$tab = $this->app->tab;
|
||||
$moduleName = $tab == 'program'? 'program' : $this->moduleName;
|
||||
$methodName = $tab == 'program'? 'product' : 'browse';
|
||||
$param = $tab == 'program' ? "programID=$programID" : "productID=$productID";
|
||||
$locate = $this->createLink($moduleName, $methodName, $param);
|
||||
if($openApp == 'doc') $locate = $this->createLink('doc', 'objectLibs', 'type=product');
|
||||
if($tab == 'doc') $locate = $this->createLink('doc', 'objectLibs', 'type=product');
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'program') $this->loadModel('program')->setMenu($programID);
|
||||
if($this->app->tab == 'program') $this->loadModel('program')->setMenu($programID);
|
||||
if($this->app->getViewType() == 'mhtml')
|
||||
{
|
||||
if($this->app->rawModule == 'projectstory' and $this->app->rawMethod == 'story')
|
||||
@@ -362,7 +362,7 @@ class product extends control
|
||||
if($programID) $lines = array('') + $this->product->getLinePairs($programID);
|
||||
if($this->config->systemMode == 'classic') $lines = array('') + $this->product->getLinePairs();
|
||||
|
||||
if($this->app->openApp == 'doc') unset($this->lang->doc->menu->product['subMenu']);
|
||||
if($this->app->tab == 'doc') unset($this->lang->doc->menu->product['subMenu']);
|
||||
|
||||
$this->view->title = $this->lang->product->create;
|
||||
$this->view->position[] = $this->view->title;
|
||||
@@ -563,7 +563,7 @@ class product extends control
|
||||
}
|
||||
}
|
||||
|
||||
$locate = $this->app->openApp == 'product' ? $this->createLink('product', 'all') : $this->createLink('program', 'product', "programID=$programID");
|
||||
$locate = $this->app->tab == 'product' ? $this->createLink('product', 'all') : $this->createLink('program', 'product', "programID=$programID");
|
||||
die(js::locate($locate, 'parent'));
|
||||
}
|
||||
|
||||
@@ -571,7 +571,7 @@ class product extends control
|
||||
if(empty($productIDList)) die(js::locate($this->session->productList, 'parent'));
|
||||
|
||||
/* Set menu when page come from program. */
|
||||
if($this->app->openApp == 'program') $this->loadModel('program')->setMenu(0);
|
||||
if($this->app->tab == 'program') $this->loadModel('program')->setMenu(0);
|
||||
|
||||
/* Set custom. */
|
||||
foreach(explode(',', $this->config->product->customBatchEditFields) as $field) $customFields[$field] = $this->lang->product->$field;
|
||||
@@ -1016,7 +1016,7 @@ class product extends control
|
||||
|
||||
$programProducts = array();
|
||||
|
||||
$products = $this->app->openApp == 'project' ? $this->product->getProducts($this->session->project) : $this->product->getList();
|
||||
$products = $this->app->tab == 'project' ? $this->product->getProducts($this->session->project) : $this->product->getList();
|
||||
|
||||
foreach($products as $product) $programProducts[$product->program][] = $product;
|
||||
|
||||
@@ -1026,10 +1026,9 @@ class product extends control
|
||||
$this->view->method = $method;
|
||||
$this->view->extra = $extra;
|
||||
$this->view->products = $programProducts;
|
||||
$this->view->projectID = $this->app->openApp == 'project' ? $this->session->project : 0;
|
||||
$this->view->projectID = $this->app->tab == 'project' ? $this->session->project : 0;
|
||||
$this->view->programs = $this->loadModel('program')->getPairs(true);
|
||||
$this->view->lines = $this->product->getLinePairs();
|
||||
$this->view->openApp = $this->app->openApp;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ class productModel extends model
|
||||
*/
|
||||
public function select($products, $productID, $currentModule, $currentMethod, $extra = '', $branch = 0, $module = 0, $moduleType = '', $withBranch = true)
|
||||
{
|
||||
$isBrowseBug = (strpos(',project,execution,', ",{$this->app->openApp},") !== false and strpos(',bug,testcase,testtask,ajaxselectstory,', ",{$this->app->rawMethod},") !== false and isset($products[0])) ? true : false;
|
||||
$isBrowseBug = (strpos(',project,execution,', ",{$this->app->tab},") !== false and strpos(',bug,testcase,testtask,ajaxselectstory,', ",{$this->app->rawMethod},") !== false and isset($products[0])) ? true : false;
|
||||
|
||||
$this->app->loadLang('product');
|
||||
if(!$isBrowseBug and !$productID)
|
||||
@@ -88,8 +88,8 @@ class productModel extends model
|
||||
setcookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
if($productID) $currentProduct = $this->getById($productID);
|
||||
|
||||
if($isBrowseBug and $this->app->openApp == 'project') $extra = $this->session->project;
|
||||
if($isBrowseBug and $this->app->openApp == 'execution') $extra = $this->session->execution;
|
||||
if($isBrowseBug and $this->app->tab == 'project') $extra = $this->session->project;
|
||||
if($isBrowseBug and $this->app->tab == 'execution') $extra = $this->session->execution;
|
||||
|
||||
if($isBrowseBug and !$productID)
|
||||
{
|
||||
@@ -483,7 +483,7 @@ class productModel extends model
|
||||
}
|
||||
|
||||
$fromModule = $this->lang->navGroup->qa == 'qa' ? 'qa' : '';
|
||||
$dropMenuLink = helper::createLink($this->app->openApp == 'qa' ? 'product' : $this->app->openApp, 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra&from=$fromModule");
|
||||
$dropMenuLink = helper::createLink($this->app->tab == 'qa' ? 'product' : $this->app->tab, 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra&from=$fromModule");
|
||||
|
||||
if($this->app->viewType == 'mhtml' and $productID) return $this->getModuleNav(array($productID => $currentProductName), $productID, $extra, $branch);
|
||||
|
||||
@@ -845,7 +845,7 @@ class productModel extends model
|
||||
$this->config->product->search['queryID'] = $queryID;
|
||||
$this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($productID);
|
||||
|
||||
$product = ($this->app->openApp == 'project' and empty($productID)) ? $products : array($productID => $products[$productID]);
|
||||
$product = ($this->app->tab == 'project' and empty($productID)) ? $products : array($productID => $products[$productID]);
|
||||
$this->config->product->search['params']['product']['values'] = $product + array('all' => $this->lang->product->allProduct);
|
||||
|
||||
/* Get module of all products.*/
|
||||
@@ -857,7 +857,7 @@ class productModel extends model
|
||||
}
|
||||
$this->config->product->search['params']['module']['values'] = $module;
|
||||
|
||||
if($this->session->currentProductType == 'normal' or $this->app->openApp == 'assetlib')
|
||||
if($this->session->currentProductType == 'normal' or $this->app->tab == 'assetlib')
|
||||
{
|
||||
unset($this->config->product->search['fields']['branch']);
|
||||
unset($this->config->product->search['params']['branch']);
|
||||
|
||||
@@ -80,7 +80,7 @@ foreach($products as $programID => $programProducts)
|
||||
|
||||
if($product->status == 'normal' and $product->PO == $this->app->user->account)
|
||||
{
|
||||
$myProductsHtml .= '<li>' . html::a($linkHtml, $productName, '', "class='$selected productName' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'") . '</li>';
|
||||
$myProductsHtml .= '<li>' . html::a($linkHtml, $productName, '', "class='$selected productName' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$app->tab'") . '</li>';
|
||||
|
||||
if($selected == 'selected') $tabActive = 'myProduct';
|
||||
|
||||
@@ -88,7 +88,7 @@ foreach($products as $programID => $programProducts)
|
||||
}
|
||||
else if($product->status == 'normal' and !($product->PO == $this->app->user->account))
|
||||
{
|
||||
$normalProductsHtml .= '<li>' . html::a($linkHtml, $productName, '', "class='$selected productName' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'") . '</li>';
|
||||
$normalProductsHtml .= '<li>' . html::a($linkHtml, $productName, '', "class='$selected productName' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$app->tab'") . '</li>';
|
||||
|
||||
if($selected == 'selected') $tabActive = 'other';
|
||||
|
||||
@@ -96,7 +96,7 @@ foreach($products as $programID => $programProducts)
|
||||
}
|
||||
else if($product->status == 'closed')
|
||||
{
|
||||
$closedProductsHtml .= html::a($linkHtml, $preFix . $productName, '', "class='$selected' title='" . $preFix . $productName . "' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$openApp'");
|
||||
$closedProductsHtml .= html::a($linkHtml, $preFix . $productName, '', "class='$selected' title='" . $preFix . $productName . "' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$app->tab'");
|
||||
|
||||
if($selected == 'selected') $tabActive = 'closed';
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
<tr>
|
||||
<td colspan="<?php echo count($visibleFields) + 4?>" class="text-center form-actions">
|
||||
<?php echo html::submitButton();?>
|
||||
<?php $browseLink = $this->app->openApp == 'product' ? $this->createLink('product', 'all') : $this->createLink('program', 'product', "programID=$programID");?>
|
||||
<?php $browseLink = $this->app->tab == 'product' ? $this->createLink('product', 'all') : $this->createLink('program', 'product', "programID=$programID");?>
|
||||
<?php echo html::a($browseLink, $lang->goback, '', 'class="btn btn-back btn-wide"');?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -131,9 +131,9 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-export muted"></i> <span class="text"><?php echo $lang->export ?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" id='exportActionMenu'>
|
||||
<?php
|
||||
$openApp = $isProjectStory ? 'project' : 'product';
|
||||
$tab = $isProjectStory ? 'project' : 'product';
|
||||
$class = common::hasPriv('story', 'export') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('story', 'export') ? "data-toggle='modal' data-type='iframe' class='export' data-app='$openApp'" : "class=disabled";
|
||||
$misc = common::hasPriv('story', 'export') ? "data-toggle='modal' data-type='iframe' class='export' data-app='$tab'" : "class=disabled";
|
||||
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType&type=$storyType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
?>
|
||||
@@ -160,7 +160,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
}
|
||||
|
||||
$hidden = empty($buttonLink) ? 'hidden' : '';
|
||||
echo html::a($buttonLink, "<i class='icon icon-plus'></i> $buttonTitle", '', "class='btn $buttonType $hidden create-story-btn' data-app='$openApp'");
|
||||
echo html::a($buttonLink, "<i class='icon icon-plus'></i> $buttonTitle", '', "class='btn $buttonType $hidden create-story-btn' data-app='$tab'");
|
||||
?>
|
||||
<?php if(!empty($productID) and common::hasPriv('story', 'batchCreate') and common::hasPriv('story', 'create')): ?>
|
||||
<button type='button' class="btn <?php echo $buttonType?> dropdown-toggle" data-toggle='dropdown'><span class='caret'></span></button>
|
||||
@@ -172,15 +172,15 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
|
||||
if($isProjectStory) $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=&projectID=$projectID");
|
||||
$link = $this->createLink('tutorial', 'wizard', "module=story&method=create¶ms=$wizardParams");
|
||||
echo html::a($link, $lang->story->createCommon, '', "data-app='$openApp'");
|
||||
echo html::a($link, $lang->story->createCommon, '', "data-app='$tab'");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a($createStoryLink, $lang->story->create, '', "data-group='$openApp'");
|
||||
echo html::a($createStoryLink, $lang->story->create, '', "data-group='$tab'");
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<li><?php echo html::a($batchCreateLink, $lang->story->batchCreate, '', "data-group='$openApp'");?></li>
|
||||
<li><?php echo html::a($batchCreateLink, $lang->story->batchCreate, '', "data-group='$tab'");?></li>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -282,8 +282,8 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
$canBatchChangeModule = ($canBeChanged and common::hasPriv('story', 'batchChangeModule'));
|
||||
$canBatchChangePlan = ($canBeChanged and common::hasPriv('story', 'batchChangePlan'));
|
||||
$canBatchAssignTo = ($canBeChanged and common::hasPriv('story', 'batchAssignTo'));
|
||||
$canBatchUnlink = ($canBeChanged and $this->app->openApp == 'project' and common::hasPriv('projectstory', 'batchUnlinkStory'));
|
||||
$canBatchImportToLib = ($canBeChanged and $this->app->openApp == 'project' and isset($this->config->maxVersion) and common::hasPriv('story', 'batchImportToLib'));
|
||||
$canBatchUnlink = ($canBeChanged and $this->app->tab == 'project' and common::hasPriv('projectstory', 'batchUnlinkStory'));
|
||||
$canBatchImportToLib = ($canBeChanged and $this->app->tab == 'project' and isset($this->config->maxVersion) and common::hasPriv('story', 'batchImportToLib'));
|
||||
|
||||
$canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchReview or $canBatchChangeStage or $canBatchChangeModule or $canBatchChangePlan or $canBatchAssignTo or $canBatchUnlink or $canBatchImportToLib);
|
||||
?>
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if($this->app->openApp == 'project'):?>
|
||||
<?php if($this->app->tab == 'project'):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->product->noProduct;?></span> <?php common::printLink('project', 'manageProducts', "projectID=$objectID", "<i class='icon icon-plus'></i> " . $lang->project->manageProducts, '', "class='btn btn-info' data-app='project'");?></p>
|
||||
</div>
|
||||
<?php elseif($this->app->openApp == 'execution'):?>
|
||||
<?php elseif($this->app->tab == 'execution'):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->product->noProduct;?></span> <?php common::printLink('execution', 'manageProducts', "executionID=$objectID", "<i class='icon icon-plus'></i> " . $lang->execution->manageProducts, '', "class='btn btn-info' data-app='execution'");?></p>
|
||||
</div>
|
||||
|
||||
@@ -377,11 +377,11 @@ class project extends control
|
||||
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $projectID));
|
||||
|
||||
if($this->app->openApp == 'program')
|
||||
if($this->app->tab == 'program')
|
||||
{
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('program', 'browse')));
|
||||
}
|
||||
elseif($this->app->openApp == 'doc')
|
||||
elseif($this->app->tab == 'doc')
|
||||
{
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'objectLibs', "type=project&objectID=$projectID")));
|
||||
}
|
||||
@@ -399,7 +399,7 @@ class project extends control
|
||||
}
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'program') $this->loadModel('program')->setMenu($programID);
|
||||
if($this->app->tab == 'program') $this->loadModel('program')->setMenu($programID);
|
||||
|
||||
$name = '';
|
||||
$code = '';
|
||||
@@ -431,7 +431,7 @@ class project extends control
|
||||
}
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'doc') unset($this->lang->doc->menu->project['subMenu']);
|
||||
if($this->app->tab == 'doc') unset($this->lang->doc->menu->project['subMenu']);
|
||||
|
||||
$this->view->title = $this->lang->project->create;
|
||||
$this->view->position[] = $this->lang->project->create;
|
||||
@@ -586,7 +586,7 @@ class project extends control
|
||||
die(js::locate($this->session->projectList, 'parent'));
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'program') $this->loadModel('program')->setMenu(0);
|
||||
if($this->app->tab == 'program') $this->loadModel('program')->setMenu(0);
|
||||
|
||||
$projectIdList = $this->post->projectIdList ? $this->post->projectIdList : die(js::locate($this->session->projectList, 'parent'));
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchAll('id');
|
||||
@@ -1665,11 +1665,11 @@ class project extends control
|
||||
}
|
||||
|
||||
$project = $this->project->getById($projectID);
|
||||
if($this->app->openApp == 'program')
|
||||
if($this->app->tab == 'program')
|
||||
{
|
||||
$this->program->setMenu($project->parent);
|
||||
}
|
||||
else if($this->app->openApp == 'project')
|
||||
else if($this->app->tab == 'project')
|
||||
{
|
||||
$this->project->setMenu($projectID);
|
||||
}
|
||||
|
||||
@@ -1483,8 +1483,8 @@ class projectModel extends model
|
||||
}
|
||||
|
||||
$from = $project->from == 'project' ? 'project' : 'pgmproject';
|
||||
$iframe = $this->app->openApp == 'program' ? 'iframe' : '';
|
||||
$onlyBody = $this->app->openApp == 'program' ? true : '';
|
||||
$iframe = $this->app->tab == 'program' ? 'iframe' : '';
|
||||
$onlyBody = $this->app->tab == 'program' ? true : '';
|
||||
common::printIcon('project', 'edit', "projectID=$project->id", $project, 'list', 'edit', '', $iframe, $onlyBody, "data-app=project", '', $project->id);
|
||||
common::printIcon('project', 'manageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', "data-app=project", $this->lang->execution->team, $project->id);
|
||||
if($this->config->systemMode == 'new') common::printIcon('project', 'group', "projectID=$project->id&programID=$programID", $project, 'list', 'lock', '', '', '', "data-app=project", '', $project->id);
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<tr>
|
||||
<td class='cell-id'>
|
||||
<?php if($canBatchAssignTo):?>
|
||||
<?php echo html::checkbox('bugIDList', array($bug->id => ''), '', $arrtibute) . html::a($viewLink, sprintf('%03d', $bug->id), '', "data-app={$this->app->openApp}");?>
|
||||
<?php echo html::checkbox('bugIDList', array($bug->id => ''), '', $arrtibute) . html::a($viewLink, sprintf('%03d', $bug->id), '', "data-app={$this->app->tab}");?>
|
||||
<?php else:?>
|
||||
<?php printf('%03d', $bug->id);?>
|
||||
<?php endif;?>
|
||||
@@ -99,7 +99,7 @@
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $bug->pri?>' title='<?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?></span></td>
|
||||
<td class='text-left c-name' title="<?php echo $bug->title?>"><?php echo html::a($viewLink, $bug->title, null, "style='color: $bug->color' data-app={$this->app->openApp}");?></td>
|
||||
<td class='text-left c-name' title="<?php echo $bug->title?>"><?php echo html::a($viewLink, $bug->title, null, "style='color: $bug->color' data-app={$this->app->tab}");?></td>
|
||||
<td><?php echo zget($users, $bug->openedBy, $bug->openedBy);?></td>
|
||||
<td class='c-assignedTo has-btn text-left'><?php $this->bug->printAssignedHtml($bug, $users);?></td>
|
||||
<td><?php echo zget($users, $bug->resolvedBy, $bug->resolvedBy);?></td>
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
<div class='row'>
|
||||
<div class='col-xs-6'>
|
||||
<div class='project-type text-center'>
|
||||
<?php echo html::a($this->createLink("project", "create", "model=scrum&projectID=$projectID"), "<img class='project-type-img' data-type='scrum' src='{$config->webRoot}theme/default/images/main/scrum.png'>", '', "data-app='{$app->openApp}'")?>
|
||||
<?php echo html::a($this->createLink("project", "create", "model=scrum&projectID=$projectID"), "<img class='project-type-img' data-type='scrum' src='{$config->webRoot}theme/default/images/main/scrum.png'>", '', "data-app='{$app->tab}'")?>
|
||||
<h3><?php echo $lang->project->scrum; ?></h3>
|
||||
<p><?php echo $lang->project->scrumTitle; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-xs-6'>
|
||||
<div class='project-type text-center'>
|
||||
<?php echo html::a($this->createLink("project", "create", "model=waterfall&projectID=$projectID"), "<img class='project-type-img' data-type='waterfall' src='{$config->webRoot}theme/default/images/main/waterfall.png'>", '', "data-app='{$app->openApp}'")?>
|
||||
<?php echo html::a($this->createLink("project", "create", "model=waterfall&projectID=$projectID"), "<img class='project-type-img' data-type='waterfall' src='{$config->webRoot}theme/default/images/main/waterfall.png'>", '', "data-app='{$app->tab}'")?>
|
||||
<h3><?php echo $lang->project->waterfall; ?></h3>
|
||||
<p><?php echo $lang->project->waterfallTitle; ?></p>
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->testtask->noTesttask;?></span>
|
||||
<?php if(common::canModify('project', $project) and common::hasPriv('testtask', 'create')):?>
|
||||
<?php echo html::a($this->createLink('testtask', 'create', "product=0&executionID=0&build=0&projectID=$projectID"), "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-info' data-app={$this->app->openApp}");?>
|
||||
<?php echo html::a($this->createLink('testtask', 'create', "product=0&executionID=0&build=0&projectID=$projectID"), "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-info' data-app={$this->app->tab}");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -85,7 +85,7 @@ class projectrelease extends control
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->type = $type;
|
||||
$this->view->from = $this->app->openApp;
|
||||
$this->view->from = $this->app->tab;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ class projectrelease extends control
|
||||
public function view($releaseID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
|
||||
{
|
||||
$this->session->set('buildList', $this->app->getURI(true), 'execution');
|
||||
$this->session->set('storyList', $this->app->getURI(true), $this->app->openApp);
|
||||
$this->session->set('storyList', $this->app->getURI(true), $this->app->tab);
|
||||
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('bug');
|
||||
@@ -445,7 +445,7 @@ class projectrelease extends control
|
||||
$this->projectrelease->linkStory($releaseID);
|
||||
die(js::locate(inlink('view', "releaseID=$releaseID&type=story"), 'parent'));
|
||||
}
|
||||
$this->session->set('storyList', inlink('view', "releaseID=$releaseID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), $this->app->openApp);
|
||||
$this->session->set('storyList', inlink('view', "releaseID=$releaseID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), $this->app->tab);
|
||||
|
||||
$release = $this->projectrelease->getByID($releaseID);
|
||||
$build = $this->loadModel('build')->getByID($release->build);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php $mailTitle = 'RELEASE #' . $object->id . ' ' . $object->name;?>
|
||||
<?php $module = $this->app->openApp == 'product' ? 'release' : 'projectrelease';?>
|
||||
<?php $module = $this->app->tab == 'product' ? 'release' : 'projectrelease';?>
|
||||
<?php include $this->app->getModuleRoot() . 'common/view/mail.header.html.php';?>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
+11
-11
@@ -45,14 +45,14 @@ class repo extends control
|
||||
*/
|
||||
public function commonAction($repoID = 0, $objectID = 0)
|
||||
{
|
||||
$openApp = $this->app->openApp;
|
||||
$this->repos = $this->repo->getRepoPairs($openApp, $objectID);
|
||||
$tab = $this->app->tab;
|
||||
$this->repos = $this->repo->getRepoPairs($tab, $objectID);
|
||||
|
||||
if($openApp == 'project')
|
||||
if($tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($objectID);
|
||||
}
|
||||
else if($openApp == 'execution')
|
||||
else if($tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($objectID);
|
||||
}
|
||||
@@ -593,13 +593,13 @@ class repo extends control
|
||||
$encodePath = $this->repo->encodePath($path);
|
||||
if($change['kind'] == '' or $change['kind'] == 'file')
|
||||
{
|
||||
$change['view'] = $viewPriv ? html::a($this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision=$revision"), $this->lang->repo->viewA, '', "data-app='{$this->app->openApp}'") : '';
|
||||
if($change['action'] == 'M') $change['diff'] = $diffPriv ? html::a($this->repo->createLink('diff', "repoID=$repoID&objectID=$objectID&entry=$encodePath&oldRevision=$oldRevision&newRevision=$revision"), $this->lang->repo->diffAB, '', "data-app='{$this->app->openApp}'") : '';
|
||||
$change['view'] = $viewPriv ? html::a($this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision=$revision"), $this->lang->repo->viewA, '', "data-app='{$this->app->tab}'") : '';
|
||||
if($change['action'] == 'M') $change['diff'] = $diffPriv ? html::a($this->repo->createLink('diff', "repoID=$repoID&objectID=$objectID&entry=$encodePath&oldRevision=$oldRevision&newRevision=$revision"), $this->lang->repo->diffAB, '', "data-app='{$this->app->tab}'") : '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$change['view'] = $viewPriv ? html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=&objectID=$objectID&path=$encodePath&revision=$revision"), $this->lang->repo->browse, '', "data-app='{$this->app->openApp}'") : '';
|
||||
if($change['action'] == 'M') $change['diff'] = $diffPriv ? html::a($this->repo->createLink('diff', "repoID=$repoID&objectID=$objectID&entry=$encodePath&oldRevision=$oldRevision&newRevision=$revision"), $this->lang->repo->diffAB, '', "data-app='{$this->app->openApp}'") : '';
|
||||
$change['view'] = $viewPriv ? html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=&objectID=$objectID&path=$encodePath&revision=$revision"), $this->lang->repo->browse, '', "data-app='{$this->app->tab}'") : '';
|
||||
if($change['action'] == 'M') $change['diff'] = $diffPriv ? html::a($this->repo->createLink('diff', "repoID=$repoID&objectID=$objectID&entry=$encodePath&oldRevision=$oldRevision&newRevision=$revision"), $this->lang->repo->diffAB, '', "data-app='{$this->app->tab}'") : '';
|
||||
}
|
||||
$changes[$path] = $change;
|
||||
}
|
||||
@@ -876,7 +876,7 @@ class repo extends control
|
||||
$this->view->repoID = $repoID;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->browseLink = $this->repo->createLink('browse', "repoID=" . ($this->app->openApp == 'devops' ? $repoID : '') . "&branchID=$branch&objectID=$objectID", '', false);
|
||||
$this->view->browseLink = $this->repo->createLink('browse', "repoID=" . ($this->app->tab == 'devops' ? $repoID : '') . "&branchID=$branch&objectID=$objectID", '', false);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1103,7 +1103,7 @@ class repo extends control
|
||||
foreach($repos as $id => $repoName)
|
||||
{
|
||||
$selected = $id == $repoID ? 'selected' : '';
|
||||
$reposHtml .= html::a($this->createLink('repo', 'browse', "repoID=$id&branchID=&objectID=$objectID"), $repoName, '', "class='$selected' data-app='{$this->app->openApp}'");
|
||||
$reposHtml .= html::a($this->createLink('repo', 'browse', "repoID=$id&branchID=&objectID=$objectID"), $repoName, '', "class='$selected' data-app='{$this->app->tab}'");
|
||||
}
|
||||
$reposHtml .= '</div></div></div>';
|
||||
|
||||
@@ -1153,7 +1153,7 @@ class repo extends control
|
||||
foreach($branches as $id => $branchName)
|
||||
{
|
||||
$selected = $id == $branchID ? 'selected' : '';
|
||||
$branchesHtml .= html::a($this->createLink('repo', 'browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID"), $branchName, '', "class='$selected' data-app='{$this->app->openApp}'");
|
||||
$branchesHtml .= html::a($this->createLink('repo', 'browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID"), $branchName, '', "class='$selected' data-app='{$this->app->tab}'");
|
||||
}
|
||||
$branchesHtml .= '</div></div></div>';
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ class repoModel extends model
|
||||
{
|
||||
if($repoID > 0) $this->session->set('repoID', (int)$repoID);
|
||||
|
||||
$repos = $this->getRepoPairs($this->app->openApp, $objectID);
|
||||
$repos = $this->getRepoPairs($this->app->tab, $objectID);
|
||||
if($repoID == 0 and $this->session->repoID == '')
|
||||
{
|
||||
$this->session->set('repoID', key($repos));
|
||||
|
||||
@@ -37,7 +37,7 @@ if(isset($entry)) $pathInfo .= '&type=file';
|
||||
<label></label>
|
||||
</div>
|
||||
</td>
|
||||
<td class='versions'><span class="revision"><?php echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision={$log->revision}" . $pathInfo), $repo->SCM != 'Subversion' ? substr($log->revision, 0, 10) : $log->revision, '', "data-app='{$this->app->openApp}'");?></span></td>
|
||||
<td class='versions'><span class="revision"><?php echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision={$log->revision}" . $pathInfo), $repo->SCM != 'Subversion' ? substr($log->revision, 0, 10) : $log->revision, '', "data-app='{$this->app->tab}'");?></span></td>
|
||||
<?php if($repo->SCM != 'Subversion'):?>
|
||||
<td><?php echo $log->commit?></td>
|
||||
<?php endif;?>
|
||||
@@ -51,7 +51,7 @@ if(isset($entry)) $pathInfo .= '&type=file';
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if(common::hasPriv('repo', 'diff')) echo html::submitButton($lang->repo->diff, '', count($revisions) < 2 ? 'disabled btn btn-primary' : 'btn btn-primary')?>
|
||||
<?php echo html::a($this->repo->createLink('log', "repoID=$repoID&objectID=$objectID&entry=" . $this->repo->encodePath($path) . "&revision=HEAD&type=$logType"), $lang->repo->allLog, '', "class='allLogs' data-app='{$this->app->openApp}'");?>
|
||||
<?php echo html::a($this->repo->createLink('log', "repoID=$repoID&objectID=$objectID&entry=" . $this->repo->encodePath($path) . "&revision=HEAD&type=$logType"), $lang->repo->allLog, '', "class='allLogs' data-app='{$this->app->tab}'");?>
|
||||
<div class='pull-right'>
|
||||
<div class='btn-group'>
|
||||
<?php
|
||||
|
||||
@@ -20,7 +20,7 @@ css::import($jsRoot . 'misc/highlight/styles/github.css');
|
||||
$backURI = $this->session->repoView ? $this->session->repoView : $this->session->repoList;
|
||||
if($backURI)
|
||||
{
|
||||
echo html::a($backURI, "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "class='btn btn-link' data-app='{$app->openApp}'");
|
||||
echo html::a($backURI, "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "class='btn btn-link' data-app='{$app->tab}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -32,14 +32,14 @@ css::import($jsRoot . 'misc/highlight/styles/github.css');
|
||||
<strong>
|
||||
<?php
|
||||
$base64BranchID = base64_encode($branchID);
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->tab}'");
|
||||
$paths = explode('/', $entry);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->tab}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
echo " <span class='label label-info'>" . $revisionName . '</span>';
|
||||
@@ -59,7 +59,7 @@ css::import($jsRoot . 'misc/highlight/styles/github.css');
|
||||
<?php echo html::commonButton(zget($lang->repo->encodingList, $encoding, $lang->repo->encoding) . "<span class='caret'></span>", "id='encoding' data-toggle='dropdown'", 'btn dropdown-toggle')?>
|
||||
<ul class='dropdown-menu' role='menu' aria-labelledby='encoding'>
|
||||
<?php foreach($lang->repo->encodingList as $key => $val):?>
|
||||
<li><?php echo html::a($this->repo->createLink('blame', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision=$revision&encoding=$key"), $val, '', "data-app='{$app->openApp}'")?></li>
|
||||
<li><?php echo html::a($this->repo->createLink('blame', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision=$revision&encoding=$key"), $val, '', "data-app='{$app->tab}'")?></li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
foreach($repos as $id => $repoName)
|
||||
{
|
||||
$isSelected = $id == $repoID ? 'class="selected"' : '';
|
||||
echo "<li $isSelected>" . html::a($this->createLink('repo', 'browse', "repoID=$id&branchID=&objectID=$objectID"), $repoName, '', "title='{$repoName}' class='text-ellipsis' data-app='{$app->openApp}'") . "</li>";
|
||||
echo "<li $isSelected>" . html::a($this->createLink('repo', 'browse', "repoID=$id&branchID=&objectID=$objectID"), $repoName, '', "title='{$repoName}' class='text-ellipsis' data-app='{$app->tab}'") . "</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
@@ -32,7 +32,7 @@
|
||||
{
|
||||
$isSelected = $id == $branchID ? 'class="selected"' : '';
|
||||
$base64BranchID = base64_encode($id);
|
||||
echo "<li $isSelected>" . html::a($this->createLink('repo', 'browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $branchName, '', "title='{$branchName}' class='text-ellipsis' data-app='{$app->openApp}'") . "</li>";
|
||||
echo "<li $isSelected>" . html::a($this->createLink('repo', 'browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $branchName, '', "title='{$branchName}' class='text-ellipsis' data-app='{$app->tab}'") . "</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
@@ -42,14 +42,14 @@
|
||||
<strong>
|
||||
<?php
|
||||
$base64BranchID = base64_encode($branchID);
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->tab}'");
|
||||
$paths= explode('/', $path);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->tab}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
?>
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<span class='last-sync-time'><?php echo $lang->repo->notice->lastSyncTime . $cacheTime?></span>
|
||||
<?php echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($path) . "&revision=$revision&refresh=1"), "<i class='icon icon-refresh'></i> " . $lang->refresh, '', "class='btn btn-primary' data-app={$app->openApp}");?>
|
||||
<?php echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($path) . "&revision=$revision&refresh=1"), "<i class='icon icon-refresh'></i> " . $lang->refresh, '', "class='btn btn-primary' data-app={$app->tab}");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row fade">
|
||||
@@ -85,7 +85,7 @@
|
||||
<?php
|
||||
$infoPath = trim($path . '/' . $info->name, '/');
|
||||
$link = $info->kind == 'dir' ? $this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($infoPath)) : $this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=" . $this->repo->encodePath($infoPath));
|
||||
echo html::a($link, $info->name, '', "title='{$info->name}' data-app={$app->openApp}");
|
||||
echo html::a($link, $info->name, '', "title='{$info->name}' data-app={$app->tab}");
|
||||
?>
|
||||
</td>
|
||||
<td align='center'><?php echo $repo->SCM == 'Subversion' ? $info->revision : substr($info->revision, 0, 10);?></td>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
$backURI = $this->session->repoView ? $this->session->repoView : $this->session->repoList;
|
||||
if($backURI)
|
||||
{
|
||||
echo html::a($backURI, "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "class='btn btn-link' data-app='{$app->openApp}'");
|
||||
echo html::a($backURI, "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "class='btn btn-link' data-app='{$app->tab}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="divider"></div>
|
||||
<div class="page-title">
|
||||
<?php
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=&objectID=$objectID"), $repo->name, '', "data-app='{$app->tab}'");
|
||||
$paths = explode('/', $entry);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
@@ -36,7 +36,7 @@
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->tab}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
if(strpos($repo->SCM, 'Subversion') === false)
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
<div class="page-title">
|
||||
<strong>
|
||||
<?php
|
||||
echo html::a($this->repo->createLink('log', "repoID=$repoID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
echo html::a($this->repo->createLink('log', "repoID=$repoID&objectID=$objectID"), $repo->name, '', "data-app='{$app->tab}'");
|
||||
$paths= explode('/', $entry);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('log', "repoID=$repoID&ojbectID=$objectID&entry=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('log', "repoID=$repoID&ojbectID=$objectID&entry=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->tab}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
?>
|
||||
@@ -40,9 +40,9 @@
|
||||
<ul class="nav nav-default">
|
||||
<?php $encodeEntry = $this->repo->encodePath($entry);?>
|
||||
<li><a><?php echo $lang->repo->log;?></a></li>
|
||||
<li><?php echo html::a($this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=$encodeEntry&revision=$revision"), $lang->repo->view, '', "data-app='{$app->openApp}'");?></li>
|
||||
<li><?php echo html::a($this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=$encodeEntry&revision=$revision"), $lang->repo->view, '', "data-app='{$app->tab}'");?></li>
|
||||
<?php if($info->kind == 'file'):?>
|
||||
<li><?php echo html::a($this->repo->createLink('blame', "repoID=$repoID&objectID=$objectID*&entry=$encodeEntry&revision=$revision"), $lang->repo->blame, '', "data-app='{$app->openApp}'");?></li>
|
||||
<li><?php echo html::a($this->repo->createLink('blame', "repoID=$repoID&objectID=$objectID*&entry=$encodeEntry&revision=$revision"), $lang->repo->blame, '', "data-app='{$app->tab}'");?></li>
|
||||
<li><?php echo html::a($this->repo->createLink('download', "repoID=$repoID&path=$encodeEntry&fromRevision=$revision"), $lang->repo->download, 'hiddenwin');?></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
@@ -70,7 +70,7 @@
|
||||
<label></label>
|
||||
</div>
|
||||
</td>
|
||||
<td class='versions'><?php echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision=" . $log->revision), substr($log->revision, 0, 10), '', "data-app='{$app->openApp}'");?></td>
|
||||
<td class='versions'><?php echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision=" . $log->revision), substr($log->revision, 0, 10), '', "data-app='{$app->tab}'");?></td>
|
||||
<?php if($repo->SCM != 'Subversion'):?>
|
||||
<td><?php echo $log->commit?></td>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -34,7 +34,7 @@ $typeInfo = $type == 'file' ? '&type=file' : '';
|
||||
<div class='detail'>
|
||||
<div class='detail-title'>
|
||||
<?php echo $lang->repo->changes;?>
|
||||
<div class='pull-right'><?php if(common::hasPriv('repo', 'diff')) echo html::a($this->repo->createLink('diff', "repoID=$repoID&objectID=$objectID&entry=&fromRevision=$oldRevision&toRevision=$revision"), $lang->repo->diffAll, '', "data-app='{$app->openApp}'");?></div>
|
||||
<div class='pull-right'><?php if(common::hasPriv('repo', 'diff')) echo html::a($this->repo->createLink('diff', "repoID=$repoID&objectID=$objectID&entry=&fromRevision=$oldRevision&toRevision=$revision"), $lang->repo->diffAll, '', "data-app='{$app->tab}'");?></div>
|
||||
</div>
|
||||
<div class='detail-content'>
|
||||
<table class='table no-margin'>
|
||||
@@ -85,8 +85,8 @@ $typeInfo = $type == 'file' ? '&type=file' : '';
|
||||
</div>
|
||||
<div id="mainActions" class='main-actions'>
|
||||
<nav class="container">
|
||||
<?php if(!empty($preAndNext->pre)) echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision={$preAndNext->pre}" . $pathInfo . $typeInfo, 'html'), "<i class='icon-pre icon-chevron-left'></i>", '', "data-app='{$app->openApp}' id='prevPage' class='btn btn-info' title='{$preAndNext->pre}'")?>
|
||||
<?php if(!empty($preAndNext->next)) echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision={$preAndNext->next}" . $pathInfo . $typeInfo, 'html'), "<i class='icon-pre icon-chevron-right'></i>", '', "data-app='{$app->openApp}' id='nextPage' class='btn btn-info' title='{$preAndNext->next}'")?>
|
||||
<?php if(!empty($preAndNext->pre)) echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision={$preAndNext->pre}" . $pathInfo . $typeInfo, 'html'), "<i class='icon-pre icon-chevron-left'></i>", '', "data-app='{$app->tab}' id='prevPage' class='btn btn-info' title='{$preAndNext->pre}'")?>
|
||||
<?php if(!empty($preAndNext->next)) echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision={$preAndNext->next}" . $pathInfo . $typeInfo, 'html'), "<i class='icon-pre icon-chevron-right'></i>", '', "data-app='{$app->tab}' id='nextPage' class='btn btn-info' title='{$preAndNext->next}'")?>
|
||||
</nav>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -20,20 +20,20 @@ $version = " <span class=\"label label-info\">$revisionName</span>";
|
||||
<?php if(!isonlybody()):?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php echo html::a($this->session->repoList, "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "class='btn btn-link' data-app='{$app->openApp}'");?>
|
||||
<?php echo html::a($this->session->repoList, "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "class='btn btn-link' data-app='{$app->tab}'");?>
|
||||
<div class="divider"></div>
|
||||
<div class="page-title">
|
||||
<strong>
|
||||
<?php
|
||||
$base64BranchID = base64_encode($branchID);
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->tab}'");
|
||||
$paths= explode('/', $entry);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->tab}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
echo $version;
|
||||
@@ -42,7 +42,7 @@ $version = " <span class=\"label label-info\">$revisionName</span>";
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision=$revision"), $lang->repo->allChanges, '', "class='btn btn-primary' data-app='{$app->openApp}'")?>
|
||||
<?php echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision=$revision"), $lang->repo->allChanges, '', "class='btn btn-primary' data-app='{$app->tab}'")?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -57,7 +57,7 @@ $version = " <span class=\"label label-info\">$revisionName</span>";
|
||||
<div class='panel-actions'>
|
||||
<?php if($suffix != 'binary' and strpos($config->repo->images, "|$suffix|") === false):?>
|
||||
<?php
|
||||
if(common::hasPriv('repo', 'blame')) echo html::a($this->repo->createLink('blame', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision=$revision&encoding=$encoding"), html::icon('random') . $lang->repo->blame, '', "class='btn btn-sm btn-primary' data-app='{$app->openApp}'");
|
||||
if(common::hasPriv('repo', 'blame')) echo html::a($this->repo->createLink('blame', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision=$revision&encoding=$encoding"), html::icon('random') . $lang->repo->blame, '', "class='btn btn-sm btn-primary' data-app='{$app->tab}'");
|
||||
if(common::hasPriv('repo', 'download')) echo html::a($this->repo->createLink('download', "repoID=$repoID&path=$encodePath&fromRevision=$revision"), html::icon('download-alt') . $lang->repo->download, 'hiddenwin', "class='btn btn-sm btn-primary'");
|
||||
?>
|
||||
<?php endif;?>
|
||||
@@ -65,7 +65,7 @@ $version = " <span class=\"label label-info\">$revisionName</span>";
|
||||
<?php echo html::commonButton(zget($lang->repo->encodingList, $encoding, $lang->repo->encoding) . "<span class='caret'></span>", "id='encoding' data-toggle='dropdown'", 'btn btn-sm btn-primary dropdown-toggle')?>
|
||||
<ul class='dropdown-menu' role='menu' aria-labelledby='encoding'>
|
||||
<?php foreach($lang->repo->encodingList as $key => $val):?>
|
||||
<li><?php echo html::a($this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision=$revision&showBug=$showBug&encoding=$key", 'html', isonlybody()), $val, '', "data-app='{$app->openApp}'")?></li>
|
||||
<li><?php echo html::a($this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision=$revision&showBug=$showBug&encoding=$key", 'html', isonlybody()), $val, '', "data-app='{$app->tab}'")?></li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -92,8 +92,8 @@ $version = " <span class=\"label label-info\">$revisionName</span>";
|
||||
<?php if(!isonlybody()):?>
|
||||
<div id="mainActions" class='main-actions'>
|
||||
<nav class="container">
|
||||
<?php if(!empty($preAndNext->pre)) echo html::a($this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision={$preAndNext->pre}&showBug=$showBug", 'html', isonlybody()), "<i class='icon-pre icon-chevron-left'></i>", '', "id='prevPage' class='btn btn-info' data-app='{$app->openApp}' title='{$preAndNext->pre}'")?>
|
||||
<?php if(!empty($preAndNext->next)) echo html::a($this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision={$preAndNext->next}&showBug=$showBug", 'html', isonlybody()), "<i class='icon-pre icon-chevron-right'></i>", '', "id='nextPage' class='btn btn-info' data-app='{$app->openApp}' title='{$preAndNext->next}'")?>
|
||||
<?php if(!empty($preAndNext->pre)) echo html::a($this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision={$preAndNext->pre}&showBug=$showBug", 'html', isonlybody()), "<i class='icon-pre icon-chevron-left'></i>", '', "id='prevPage' class='btn btn-info' data-app='{$app->tab}' title='{$preAndNext->pre}'")?>
|
||||
<?php if(!empty($preAndNext->next)) echo html::a($this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision={$preAndNext->next}&showBug=$showBug", 'html', isonlybody()), "<i class='icon-pre icon-chevron-right'></i>", '', "id='nextPage' class='btn btn-info' data-app='{$app->tab}' title='{$preAndNext->next}'")?>
|
||||
</nav>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -63,14 +63,14 @@ class stakeholder extends control
|
||||
$actionID = $this->loadModel('action')->create('stakeholder', $stakeholderID, 'added');
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $stakeholderID));
|
||||
|
||||
$moduleName = $this->app->openApp == 'program' ? 'program' : $this->moduleName;
|
||||
$methodName = $this->app->openApp == 'program' ? 'stakeholder' : 'browse';
|
||||
$param = $this->app->openApp == 'program' ? "programID=$objectID" : "projectID=$objectID";
|
||||
$moduleName = $this->app->tab == 'program' ? 'program' : $this->moduleName;
|
||||
$methodName = $this->app->tab == 'program' ? 'stakeholder' : 'browse';
|
||||
$param = $this->app->tab == 'program' ? "programID=$objectID" : "projectID=$objectID";
|
||||
$locate = $this->createLink($moduleName, $methodName, $param);
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'program')
|
||||
if($this->app->tab == 'program')
|
||||
{
|
||||
$this->loadModel('program')->setMenu($objectID);
|
||||
$this->view->members = $this->loadModel('program')->getTeamMemberPairs($objectID);
|
||||
@@ -84,8 +84,8 @@ class stakeholder extends control
|
||||
$this->view->title = $this->lang->stakeholder->create;
|
||||
$this->view->position[] = $this->lang->stakeholder->create;
|
||||
$this->view->companys = $this->loadModel('company')->getOutsideCompanies();
|
||||
$this->view->programID = $this->app->openApp == 'program' ? $objectID : 0;
|
||||
$this->view->projectID = $this->app->openApp == 'project' ? $objectID : 0;
|
||||
$this->view->programID = $this->app->tab == 'program' ? $objectID : 0;
|
||||
$this->view->projectID = $this->app->tab == 'project' ? $objectID : 0;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -108,7 +108,7 @@ class stakeholder extends control
|
||||
die(js::locate($this->createLink('stakeholder', 'browse', "projectID=$projectID"), 'parent'));
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'program')
|
||||
if($this->app->tab == 'program')
|
||||
{
|
||||
$this->loadModel('program')->setMenu($projectID);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ class stakeholderModel extends model
|
||||
{
|
||||
$stakeholder = new stdclass();
|
||||
$data = fixer::input('post')
|
||||
->setDefault('objectType', $this->app->openApp)
|
||||
->setDefault('objectType', $this->app->tab)
|
||||
->setDefault('objectID', $objectID)
|
||||
->setDefault('createdBy', $this->app->user->account)
|
||||
->setDefault('createdDate', helper::today())
|
||||
|
||||
@@ -31,7 +31,7 @@ $createLink = $this->createLink('stakeholder', 'create', "projectID=$user->objec
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::hasPriv('stakeholder', 'create')) echo html::a($createLink, "<i class='icon icon-plus'></i> {$lang->stakeholder->create}", '', "class='btn btn-primary' data-app=$app->openApp");?>
|
||||
<?php if(common::hasPriv('stakeholder', 'create')) echo html::a($createLink, "<i class='icon icon-plus'></i> {$lang->stakeholder->create}", '', "class='btn btn-primary' data-app=$app->tab");?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-row" id="mainContent">
|
||||
|
||||
+24
-24
@@ -27,7 +27,7 @@ class story extends control
|
||||
$this->loadModel('user');
|
||||
$this->loadModel('action');
|
||||
|
||||
if($this->app->openApp == 'project') $this->app->rawModule = 'projectstory';
|
||||
if($this->app->tab == 'project') $this->app->rawModule = 'projectstory';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,16 +49,16 @@ class story extends control
|
||||
public function create($productID = 0, $branch = 0, $moduleID = 0, $storyID = 0, $objectID = 0, $bugID = 0, $planID = 0, $todoID = 0, $extra = '', $type = 'story')
|
||||
{
|
||||
$this->story->replaceURLang($type);
|
||||
if($this->app->openApp == 'product')
|
||||
if($this->app->tab == 'product')
|
||||
{
|
||||
$this->product->setMenu($productID);
|
||||
}
|
||||
else if($this->app->openApp == 'project')
|
||||
else if($this->app->tab == 'project')
|
||||
{
|
||||
$objectID = empty($objectID) ? $this->session->project : $objectID;
|
||||
$this->project->setMenu($objectID);
|
||||
}
|
||||
else if($this->app->openApp == 'execution')
|
||||
else if($this->app->tab == 'execution')
|
||||
{
|
||||
$objectID = empty($objectID) ? $this->session->execution : $objectID;
|
||||
$this->execution->setMenu($objectID);
|
||||
@@ -164,7 +164,7 @@ class story extends control
|
||||
setcookie('storyModule', 0, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
$branchID = $this->post->branch ? $this->post->branch : $branch;
|
||||
$response['locate'] = $this->createLink('product', 'browse', "productID=$productID&branch=$branchID&browseType=unclosed¶m=0&type=$type&orderBy=id_desc");
|
||||
if($this->session->storyList and $this->app->openApp != 'product') $response['locate'] = $this->session->storyList;
|
||||
if($this->session->storyList and $this->app->tab != 'product') $response['locate'] = $this->session->storyList;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -528,15 +528,15 @@ class story extends control
|
||||
|
||||
/* Set menu. */
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($product->id);
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($this->session->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'product')
|
||||
elseif($this->app->tab == 'product')
|
||||
{
|
||||
$this->product->setMenu($product->id, $story->branch);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($this->session->execution);
|
||||
}
|
||||
@@ -647,23 +647,23 @@ class story extends control
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
$this->story->replaceURLang($storyType);
|
||||
|
||||
if($this->app->openApp == 'product')
|
||||
if($this->app->tab == 'product')
|
||||
{
|
||||
$this->product->setMenu($productID);
|
||||
}
|
||||
else if($this->app->openApp == 'project')
|
||||
else if($this->app->tab == 'project')
|
||||
{
|
||||
$this->project->setMenu($executionID);
|
||||
}
|
||||
else if($this->app->openApp == 'execution')
|
||||
else if($this->app->tab == 'execution')
|
||||
{
|
||||
$this->execution->setMenu($executionID);
|
||||
}
|
||||
else if($this->app->openApp == 'qa')
|
||||
else if($this->app->tab == 'qa')
|
||||
{
|
||||
$this->loadModel('qa')->setMenu('', $productID);
|
||||
}
|
||||
else if($this->app->openApp == 'my')
|
||||
else if($this->app->tab == 'my')
|
||||
{
|
||||
$this->loadModel('my')->setMenu();
|
||||
if($from == 'work') $this->lang->my->menu->work['subModule'] = 'story';
|
||||
@@ -826,7 +826,7 @@ class story extends control
|
||||
|
||||
$this->executeHooks($storyID);
|
||||
|
||||
$module = $this->app->openApp == 'project' ? 'projectstory' : 'story';
|
||||
$module = $this->app->tab == 'project' ? 'projectstory' : 'story';
|
||||
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success'));
|
||||
die(js::locate($this->createLink($module, 'view', "storyID=$storyID"), 'parent'));
|
||||
@@ -898,7 +898,7 @@ class story extends control
|
||||
*/
|
||||
public function view($storyID, $version = 0, $param = 0)
|
||||
{
|
||||
$this->session->set('productList', $this->app->getURI(true) . "#app={$this->app->openApp}", 'product');
|
||||
$this->session->set('productList', $this->app->getURI(true) . "#app={$this->app->tab}", 'product');
|
||||
|
||||
$storyID = (int)$storyID;
|
||||
$story = $this->story->getById($storyID, $version, true);
|
||||
@@ -918,7 +918,7 @@ class story extends control
|
||||
$storyModule = empty($story->module) ? '' : $this->tree->getById($story->module);
|
||||
|
||||
/* Set the menu. */
|
||||
$from = $this->app->openApp;
|
||||
$from = $this->app->tab;
|
||||
$this->product->setMenu($story->product, $story->branch);
|
||||
|
||||
if($from == 'execution')
|
||||
@@ -1042,16 +1042,16 @@ class story extends control
|
||||
$this->story->replaceURLang($story->type);
|
||||
|
||||
/* Set menu. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->app->rawModule = 'projectstory';
|
||||
$this->loadModel('project')->setMenu($this->session->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'product')
|
||||
elseif($this->app->tab == 'product')
|
||||
{
|
||||
$this->product->setMenu($product->id, $story->branch);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($this->session->execution);
|
||||
}
|
||||
@@ -1236,7 +1236,7 @@ class story extends control
|
||||
if(isset($skipStory) || isset($closedStory)) echo js::alert($errorTips);
|
||||
|
||||
/* The stories of a product. */
|
||||
if($this->app->openApp == 'product')
|
||||
if($this->app->tab == 'product')
|
||||
{
|
||||
$this->product->setMenu($productID);
|
||||
$product = $this->product->getByID($productID);
|
||||
@@ -1255,7 +1255,7 @@ class story extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->project->setMenu($this->session->project);
|
||||
$this->view->title = $this->lang->story->batchEdit;
|
||||
@@ -1589,11 +1589,11 @@ class story extends control
|
||||
*/
|
||||
public function zeroCase($productID = 0, $branchID = 0, $orderBy = 'id_desc')
|
||||
{
|
||||
$this->session->set('storyList', $this->app->getURI(true) . '#app=' . $this->app->openApp, 'product');
|
||||
$this->session->set('caseList', $this->app->getURI(true), $this->app->openApp);
|
||||
$this->session->set('storyList', $this->app->getURI(true) . '#app=' . $this->app->tab, 'product');
|
||||
$this->session->set('caseList', $this->app->getURI(true), $this->app->tab);
|
||||
|
||||
$this->loadModel('testcase');
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($this->session->project);
|
||||
$this->app->rawModule = 'qa';
|
||||
|
||||
@@ -458,7 +458,7 @@ class storyModel extends model
|
||||
$story->pri = $stories->pri[$i];
|
||||
$story->estimate = $stories->estimate[$i];
|
||||
$story->status = ($stories->needReview[$i] == 0 and !$forceReview) ? 'active' : 'draft';
|
||||
$story->stage = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? 'projected' : 'wait';
|
||||
$story->stage = ($this->app->tab == 'project' or $this->app->tab == 'execution') ? 'projected' : 'wait';
|
||||
$story->keywords = $stories->keywords[$i];
|
||||
$story->sourceNote = $stories->sourceNote[$i];
|
||||
$story->product = $productID;
|
||||
@@ -2393,8 +2393,8 @@ class storyModel extends model
|
||||
/* Get the sql and form status from the query. */
|
||||
if($query)
|
||||
{
|
||||
$this->session->set('storyQuery', $query->sql, $this->app->openApp);
|
||||
$this->session->set('storyForm', $query->form, $this->app->openApp);
|
||||
$this->session->set('storyQuery', $query->sql, $this->app->tab);
|
||||
$this->session->set('storyForm', $query->form, $this->app->tab);
|
||||
}
|
||||
if($this->session->storyQuery == false) $this->session->set('storyQuery', ' 1 = 1');
|
||||
|
||||
@@ -3554,7 +3554,7 @@ class storyModel extends model
|
||||
|
||||
$module = $this->app->rawModule == 'projectstory' ? 'projectstory' : 'story';
|
||||
$canView = common::hasPriv($module, 'view');
|
||||
$openApp = $this->app->rawModule == 'projectstory' ? 'project' : 'product';
|
||||
$tab = $this->app->rawModule == 'projectstory' ? 'project' : 'product';
|
||||
$storyLink = helper::createLink($module, 'view', "storyID=$story->id");
|
||||
$account = $this->app->user->account;
|
||||
$id = $col->id;
|
||||
@@ -3628,7 +3628,7 @@ class storyModel extends model
|
||||
case 'id':
|
||||
if($canBatchAction)
|
||||
{
|
||||
echo html::checkbox('storyIdList', array($story->id => '')) . html::a($storyLink, sprintf('%03d', $story->id), '', "data-app='$openApp'");
|
||||
echo html::checkbox('storyIdList', array($story->id => '')) . html::a($storyLink, sprintf('%03d', $story->id), '', "data-app='$tab'");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3646,7 +3646,7 @@ class storyModel extends model
|
||||
if($story->branch and isset($branches[$story->branch])) echo "<span class='label label-outline label-badge'>{$branches[$story->branch]}</span> ";
|
||||
if($story->module and isset($modulePairs[$story->module])) echo "<span class='label label-gray label-badge'>{$modulePairs[$story->module]}</span> ";
|
||||
if($story->parent > 0) echo '<span class="label label-badge label-light" title="' . $this->lang->story->children . '">' . $this->lang->story->childrenAB . '</span> ';
|
||||
echo $canView ? html::a($storyLink, $story->title, '', "style='color: $story->color' data-app='$openApp'") : "<span style='color: $story->color'>{$story->title}</span>";
|
||||
echo $canView ? html::a($storyLink, $story->title, '', "style='color: $story->color' data-app='$tab'") : "<span style='color: $story->color'>{$story->title}</span>";
|
||||
if(!empty($story->children)) echo '<a class="story-toggle" data-id="' . $story->id . '"><i class="icon icon-angle-double-right"></i></a>';
|
||||
break;
|
||||
case 'plan':
|
||||
@@ -3768,7 +3768,7 @@ class storyModel extends model
|
||||
|
||||
common::printIcon('story', 'change', $vars . "&from=$story->from", $story, 'list', 'alter', '', '', false, "data-group=$story->from");
|
||||
common::printIcon('story', 'review', $vars . "&from=$story->from", $story, 'list', 'search', '', '', false, "data-group=$story->from");
|
||||
if($this->app->openApp != 'project') common::printIcon('story', 'recall', $vars, $story, 'list', 'back', 'hiddenwin', '', '', '', $this->lang->story->recall);
|
||||
if($this->app->tab != 'project') common::printIcon('story', 'recall', $vars, $story, 'list', 'back', 'hiddenwin', '', '', '', $this->lang->story->recall);
|
||||
common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('story', 'edit', $vars . "&from=$story->from", $story, 'list', '', '', '', false, "data-group=$story->from");
|
||||
if($story->type != 'requirement') common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', '', false, "data-app='qa'");
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('storyType', $storyType);?>
|
||||
<?php js::set('app', $app->openApp);?>
|
||||
<?php js::set('app', $app->tab);?>
|
||||
<div class='main-content' id='mainContent'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->story->common . $lang->colon . $lang->story->batchClose;?></h2>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('dittoNotice', $this->lang->story->dittoNotice);?>
|
||||
<?php js::set('storyType', $storyType);?>
|
||||
<?php js::set('app', $this->app->openApp);?>
|
||||
<?php js::set('app', $this->app->tab);?>
|
||||
<?php if(isset($resetActive)) js::set('resetActive', true);?>
|
||||
<div class='main-content' id='mainContent'>
|
||||
<div class='main-header'>
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php $style = $this->app->rawModule == 'projectstory' ? "style='overflow: unset; text-align: left'" : '';?>
|
||||
<?php $openApp = $this->app->rawModule == 'projectstory' ? 'project' : 'product';?>
|
||||
<?php $module = $this->app->rawModule == 'projectstory' ? 'projectstory' : 'story';?>
|
||||
<?php $style = $this->app->rawModule == 'projectstory' ? "style='overflow: unset; text-align: left'" : '';?>
|
||||
<?php $tab = $this->app->rawModule == 'projectstory' ? 'project' : 'product';?>
|
||||
<?php $module = $this->app->rawModule == 'projectstory' ? 'projectstory' : 'story';?>
|
||||
<div class='main-table' data-ride="table">
|
||||
<table class='table table-bordered' id="trackList">
|
||||
<thead>
|
||||
@@ -62,7 +62,7 @@
|
||||
<?php if($key != 'noRequirement'):?>
|
||||
<span class="label label-primary label-outline"><?php echo zget($lang->story->statusList, $requirement->status);?></span>
|
||||
<?php endif;?>
|
||||
<?php echo $key == 'noRequirement' ? $lang->story->noRequirement : html::a($this->createLink($module, 'view', "storyID=$requirement->id"), $requirement->title, '', "title=$requirement->title data-app='$openApp'");?>
|
||||
<?php echo $key == 'noRequirement' ? $lang->story->noRequirement : html::a($this->createLink($module, 'view', "storyID=$requirement->id"), $requirement->title, '', "title=$requirement->title data-app='$tab'");?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if(count($track) != 0):?>
|
||||
@@ -71,7 +71,7 @@
|
||||
<?php if($i != 1) echo '<tr>';?>
|
||||
<td style='padding-left: 10px;'>
|
||||
<?php if(isset($story->parent) and $story->parent > 0):?><span class="label label-badge label-light" title="<?php echo $this->lang->story->children;?>"><?php echo $this->lang->story->childrenAB;?></span><?php endif;?>
|
||||
<?php echo html::a($this->createLink($module, 'view', "storyID=$storyID"), $story->title, '',"title='$story->title' data-app='$openApp'");?>
|
||||
<?php echo html::a($this->createLink($module, 'view', "storyID=$storyID"), $story->title, '',"title='$story->title' data-app='$tab'");?>
|
||||
</td>
|
||||
<td>
|
||||
<?php foreach($story->tasks as $taskID => $task):?>
|
||||
|
||||
@@ -50,14 +50,14 @@
|
||||
<?php if(common::canModify('product', $product)): ?>
|
||||
<?php
|
||||
$otherParam = 'storyID=&projectID=';
|
||||
$openApp = 'product';
|
||||
$tab = 'product';
|
||||
if($this->app->rawModule == 'projectstory')
|
||||
{
|
||||
$otherParam = "storyID=&projectID={$this->session->project}";
|
||||
$openGroup = 'project';
|
||||
}
|
||||
?>
|
||||
<?php common::printLink('story', 'create', "productID={$story->product}&branch={$story->branch}&moduleID={$story->module}&$otherParam&bugID=0&planID=0&todoID=0&extra=&type=$story->type", "<i class='icon icon-plus'></i> " . $lang->story->create, '', "class='btn btn-primary' data-app='$openApp'"); ?>
|
||||
<?php common::printLink('story', 'create', "productID={$story->product}&branch={$story->branch}&moduleID={$story->module}&$otherParam&bugID=0&planID=0&todoID=0&extra=&type=$story->type", "<i class='icon icon-plus'></i> " . $lang->story->create, '', "class='btn btn-primary' data-app='$tab'"); ?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -201,7 +201,7 @@
|
||||
common::printIcon('story', 'assignTo', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true);
|
||||
if(isset($this->config->maxVersion) and $this->app->openApp == 'project' and common::hasPriv('story', 'importToLib')) echo html::a('#importToLib', "<i class='icon icon-assets'></i> " . $this->lang->story->importToLib, '', 'class="btn" data-toggle="modal"');
|
||||
if(isset($this->config->maxVersion) and $this->app->tab == 'project' and common::hasPriv('story', 'importToLib')) echo html::a('#importToLib', "<i class='icon icon-assets'></i> " . $this->lang->story->importToLib, '', 'class="btn" data-toggle="modal"');
|
||||
|
||||
if($story->parent >= 0 and $story->type != 'requirement' and (common::hasPriv('testcase', 'create', $story) or common::hasPriv('testcase', 'batchCreate', $story)))
|
||||
{
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
<?php foreach($stories as $key => $story):?>
|
||||
<?php
|
||||
$param = 0;
|
||||
if($this->app->openApp == 'project') $param = $this->session->project;
|
||||
if($this->app->openApp == 'execution') $param = $this->session->execution;
|
||||
if($this->app->tab == 'project') $param = $this->session->project;
|
||||
if($this->app->tab == 'execution') $param = $this->session->execution;
|
||||
$viewLink = $this->createLink('story', 'view', "storyID=$story->id&version=0¶m=$param");
|
||||
$canView = common::hasPriv('story', 'view');
|
||||
?>
|
||||
@@ -74,12 +74,12 @@
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
$vars = "storyID={$story->id}";
|
||||
$this->app->openApp = 'product';
|
||||
$this->app->tab = 'product';
|
||||
common::printIcon('story', 'change', $vars, $story, 'list', 'fork');
|
||||
common::printIcon('story', 'review', $vars, $story, 'list', 'glasses');
|
||||
common::printIcon('story', 'close', $vars, $story, 'list', 'off', '', 'iframe', 'yes');
|
||||
common::printIcon('story', 'edit', $vars, $story, 'list');
|
||||
$this->app->openApp = 'qa';
|
||||
$this->app->tab = 'qa';
|
||||
common::printIcon('story', 'createCase', "productID=$story->product&branch=0&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap');
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -265,7 +265,7 @@ class task extends control
|
||||
if($project->model == 'waterfall') $this->config->task->create->requiredFields .= ',estStarted,deadline';
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'my')
|
||||
if($this->app->tab == 'my')
|
||||
{
|
||||
$taskLink = $this->createLink('my', 'work', 'mode=task');
|
||||
}
|
||||
@@ -699,7 +699,7 @@ class task extends control
|
||||
|
||||
/* Set menu. */
|
||||
$execution = $this->execution->getById($task->execution);
|
||||
if($this->app->openApp == 'execution') $this->execution->setMenu($execution->id);
|
||||
if($this->app->tab == 'execution') $this->execution->setMenu($execution->id);
|
||||
|
||||
$this->executeHooks($taskID);
|
||||
|
||||
|
||||
+42
-42
@@ -44,15 +44,15 @@ class testcase extends control
|
||||
/* Get product data. */
|
||||
$products = array();
|
||||
$objectID = 0;
|
||||
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
|
||||
$tab = ($this->app->tab == 'project' or $this->app->tab == 'execution') ? $this->app->tab : 'qa';
|
||||
if(!isonlybody())
|
||||
{
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$objectID = $this->session->project;
|
||||
$products = $this->loadModel('project')->getProducts($objectID, false);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$objectID = $this->session->execution;
|
||||
$products = $this->loadModel('execution')->getProducts($objectID, false);
|
||||
@@ -61,7 +61,7 @@ class testcase extends control
|
||||
{
|
||||
$products = $this->product->getPairs();
|
||||
}
|
||||
if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&objectID=$objectID")));
|
||||
if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$tab&activeMenu=testcase&objectID=$objectID")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -103,7 +103,7 @@ class testcase extends control
|
||||
$browseType = strtolower($browseType);
|
||||
|
||||
/* Set browseType, productID, moduleID and queryID. */
|
||||
$productID = $this->app->openApp != 'project' ? $this->product->saveState($productID, $this->products) : $productID;
|
||||
$productID = $this->app->tab != '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, '', $this->config->cookieSecure, true);
|
||||
setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
@@ -122,7 +122,7 @@ class testcase extends control
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
|
||||
/* Set menu, save session. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->products = array('0' => $this->lang->product->all) + $this->loadModel('project')->getProducts($projectID, false);
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
@@ -133,8 +133,8 @@ class testcase extends control
|
||||
}
|
||||
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('caseList', $uri, $this->app->openApp);
|
||||
$this->session->set('bugList', $uri, $this->app->openApp);
|
||||
$this->session->set('caseList', $uri, $this->app->tab);
|
||||
$this->session->set('bugList', $uri, $this->app->tab);
|
||||
$this->session->set('productID', $productID);
|
||||
$this->session->set('moduleID', $moduleID);
|
||||
$this->session->set('browseType', $browseType);
|
||||
@@ -164,9 +164,9 @@ class testcase extends control
|
||||
$cases = $this->testcase->appendData($cases);
|
||||
|
||||
/* Build the search form. */
|
||||
$currentModule = $this->app->openApp == 'project' ? 'project' : 'testcase';
|
||||
$currentMethod = $this->app->openApp == 'project' ? 'testcase' : 'browse';
|
||||
$projectParam = $this->app->openApp == 'project' ? "projectID={$this->session->project}&" : '';
|
||||
$currentModule = $this->app->tab == 'project' ? 'project' : 'testcase';
|
||||
$currentMethod = $this->app->tab == 'project' ? 'testcase' : 'browse';
|
||||
$projectParam = $this->app->tab == 'project' ? "projectID={$this->session->project}&" : '';
|
||||
$actionURL = $this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID");
|
||||
$this->config->testcase->search['onMenuBar'] = 'yes';
|
||||
|
||||
@@ -230,14 +230,14 @@ class testcase extends control
|
||||
|
||||
$this->app->loadLang('testtask');
|
||||
|
||||
$this->app->openApp == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->testcase->setMenu($this->products, $productID, $branch);
|
||||
if($this->app->openApp == 'project')
|
||||
$this->app->tab == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->testcase->setMenu($this->products, $productID, $branch);
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$products = array('0' => $this->lang->product->all) + $this->project->getProducts($this->session->project, false);
|
||||
$this->lang->modulePageNav = $this->product->select($products, $productID, 'testcase', 'groupCase', '', $branch);
|
||||
}
|
||||
|
||||
$this->session->set('caseList', $this->app->getURI(true), $this->app->openApp);
|
||||
$this->session->set('caseList', $this->app->getURI(true), $this->app->tab);
|
||||
|
||||
$cases = $this->testcase->getModuleCases($productID, $branch, 0, $groupBy);
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
|
||||
@@ -291,7 +291,7 @@ class testcase extends control
|
||||
*/
|
||||
public function create($productID, $branch = '', $moduleID = 0, $from = '', $param = 0, $storyID = 0, $extras = '')
|
||||
{
|
||||
if($this->app->openApp == 'execution')
|
||||
if($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($this->session->execution);
|
||||
}
|
||||
@@ -328,8 +328,8 @@ class testcase extends control
|
||||
|
||||
$this->loadModel('action');
|
||||
$this->action->create('case', $caseID, 'Opened');
|
||||
if($this->app->openApp == 'project') $this->action->create('case', $caseID, 'linked2project', '', $this->session->project);
|
||||
if($this->app->openApp == 'execution') $this->action->create('case', $caseID, 'linked2execution', '', $this->session->execution);
|
||||
if($this->app->tab == 'project') $this->action->create('case', $caseID, 'linked2project', '', $this->session->project);
|
||||
if($this->app->tab == 'execution') $this->action->create('case', $caseID, 'linked2execution', '', $this->session->execution);
|
||||
|
||||
$this->executeHooks($caseID);
|
||||
|
||||
@@ -348,11 +348,11 @@ class testcase extends control
|
||||
if($branch === '') $branch = (int)$this->cookie->preBranch;
|
||||
|
||||
/* Set menu. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($this->session->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($this->session->execution);
|
||||
}
|
||||
@@ -433,9 +433,9 @@ class testcase extends control
|
||||
$modules = $this->tree->getAllChildID($modules);
|
||||
}
|
||||
$stories = $this->story->getProductStoryPairs($productID, $branch, $modules, array_keys($storyStatus), 'id_desc', 50, 'null', 'story', false);
|
||||
if($this->app->openApp != 'qa')
|
||||
if($this->app->tab != 'qa')
|
||||
{
|
||||
$projectID = $this->app->openApp == 'project' ? $this->session->project : $this->session->execution;
|
||||
$projectID = $this->app->tab == 'project' ? $this->session->project : $this->session->execution;
|
||||
$stories = $this->story->getExecutionStoryPairs($projectID, $productID, $branch);
|
||||
}
|
||||
if($storyID and !isset($stories[$storyID])) $stories = $this->story->formatStories(array($storyID => $story)) + $stories;//Fix bug #2406.
|
||||
@@ -490,9 +490,9 @@ class testcase extends control
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'idList' => $caseIDList));
|
||||
|
||||
setcookie('caseModule', 0, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
$currentModule = $this->app->openApp == 'project' ? 'project' : 'testcase';
|
||||
$currentMethod = $this->app->openApp == 'project' ? 'testcase' : 'browse';
|
||||
$projectParam = $this->app->openApp == 'project' ? "projectID={$this->session->project}&" : '';
|
||||
$currentModule = $this->app->tab == 'project' ? 'project' : 'testcase';
|
||||
$currentMethod = $this->app->tab == 'project' ? 'testcase' : 'browse';
|
||||
$projectParam = $this->app->tab == 'project' ? "projectID={$this->session->project}&" : '';
|
||||
die(js::locate($this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=all¶m=0&orderBy=id_desc"), 'parent'));
|
||||
}
|
||||
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
|
||||
@@ -508,7 +508,7 @@ class testcase extends control
|
||||
$currentModuleID = (int)$moduleID;
|
||||
|
||||
/* Set menu. */
|
||||
$this->app->openApp == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->testcase->setMenu($this->products, $productID, $branch);
|
||||
$this->app->tab == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->testcase->setMenu($this->products, $productID, $branch);
|
||||
|
||||
/* Set story list. */
|
||||
$story = $storyID ? $this->story->getByID($storyID) : '';
|
||||
@@ -600,7 +600,7 @@ class testcase extends control
|
||||
*/
|
||||
public function view($caseID, $version = 0, $from = 'testcase', $taskID = 0)
|
||||
{
|
||||
$this->session->set('bugList', $this->app->getURI(true), $this->app->openApp);
|
||||
$this->session->set('bugList', $this->app->getURI(true), $this->app->tab);
|
||||
|
||||
$caseID = (int)$caseID;
|
||||
$case = $this->testcase->getById($caseID, $version);
|
||||
@@ -639,7 +639,7 @@ class testcase extends control
|
||||
if($isLibCase)
|
||||
{
|
||||
$libraries = $this->loadModel('caselib')->getLibraries();
|
||||
$this->app->openApp == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->caselib->setLibMenu($libraries, $case->lib);
|
||||
$this->app->tab == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->caselib->setLibMenu($libraries, $case->lib);
|
||||
|
||||
$this->view->title = "CASE #$case->id $case->title - " . $libraries[$case->lib];
|
||||
$this->view->position[] = html::a($this->createLink('caselib', 'browse', "libID=$case->lib"), $libraries[$case->lib]);
|
||||
@@ -652,9 +652,9 @@ class testcase extends control
|
||||
$product = $this->product->getByID($productID);
|
||||
$branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($productID);
|
||||
|
||||
if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($this->session->project);
|
||||
if($this->app->openApp == 'execution') $this->loadModel('execution')->setMenu($this->session->execution);
|
||||
if($this->app->openApp == 'qa') $this->testcase->setMenu($this->products, $productID, $case->branch);
|
||||
if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project);
|
||||
if($this->app->tab == 'execution') $this->loadModel('execution')->setMenu($this->session->execution);
|
||||
if($this->app->tab == 'qa') $this->testcase->setMenu($this->products, $productID, $case->branch);
|
||||
|
||||
$this->view->title = "CASE #$case->id $case->title - " . $this->products[$productID];
|
||||
|
||||
@@ -751,7 +751,7 @@ class testcase extends control
|
||||
if($isLibCase)
|
||||
{
|
||||
$libraries = $this->loadModel('caselib')->getLibraries();
|
||||
$this->app->openApp == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->caselib->setLibMenu($libraries, $case->lib);
|
||||
$this->app->tab == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->caselib->setLibMenu($libraries, $case->lib);
|
||||
|
||||
$title = "CASE #$case->id $case->title - " . $libraries[$case->lib];
|
||||
$position[] = html::a($this->createLink('caselib', 'browse', "libID=$case->lib"), $libraries[$case->lib]);
|
||||
@@ -768,9 +768,9 @@ class testcase extends control
|
||||
$position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
|
||||
/* Set menu. */
|
||||
if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($this->session->project);
|
||||
if($this->app->openApp == 'execution') $this->loadModel('execution')->setMenu($this->session->execution);
|
||||
if($this->app->openApp == 'qa') $this->testcase->setMenu($this->products, $productID, $case->branch);
|
||||
if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project);
|
||||
if($this->app->tab == 'execution') $this->loadModel('execution')->setMenu($this->session->execution);
|
||||
if($this->app->tab == 'qa') $this->testcase->setMenu($this->products, $productID, $case->branch);
|
||||
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, $case->branch);
|
||||
if($case->lib and $case->fromCaseID)
|
||||
@@ -837,9 +837,9 @@ class testcase extends control
|
||||
$caseIDList = array_unique($caseIDList);
|
||||
$branchProduct = false;
|
||||
|
||||
if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($this->session->project);
|
||||
if($this->app->openApp == 'qa') $this->testcase->setMenu($this->products, $productID, $branch);
|
||||
if($this->app->openApp == 'execution') $this->loadModel('execution')->setMenu($this->session->execution);
|
||||
if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project);
|
||||
if($this->app->tab == 'qa') $this->testcase->setMenu($this->products, $productID, $branch);
|
||||
if($this->app->tab == 'execution') $this->loadModel('execution')->setMenu($this->session->execution);
|
||||
|
||||
/* The cases of a product. */
|
||||
if($productID)
|
||||
@@ -882,8 +882,8 @@ class testcase extends control
|
||||
$cases = $this->dao->select('t1.*,t2.id as runID')->from(TABLE_CASE)->alias('t1')
|
||||
->leftJoin(TABLE_TESTRUN)->alias('t2')->on('t1.id = t2.case')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->beginIF($this->app->openApp == 'my')->andWhere('t2.id')->in($caseIDList)->fi()
|
||||
->beginIF($this->app->openApp != 'my')->andWhere('t1.id')->in($caseIDList)->fi()
|
||||
->beginIF($this->app->tab == 'my')->andWhere('t2.id')->in($caseIDList)->fi()
|
||||
->beginIF($this->app->tab != 'my')->andWhere('t1.id')->in($caseIDList)->fi()
|
||||
->fetchAll('id');
|
||||
$caseIDList = array_keys($cases);
|
||||
|
||||
@@ -1625,7 +1625,7 @@ class testcase extends control
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
$this->app->openApp == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->testcase->setMenu($this->products, $productID, $branch);
|
||||
$this->app->tab == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->testcase->setMenu($this->products, $productID, $branch);
|
||||
|
||||
$libraries = $this->loadModel('caselib')->getLibraries();
|
||||
if(empty($libraries))
|
||||
@@ -1696,7 +1696,7 @@ class testcase extends control
|
||||
{
|
||||
unlink($tmpFile);
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
die(js::locate($this->createLink('project', 'testcase', "projectID={$this->session->project}&productID=$productID"), 'parent'));
|
||||
}
|
||||
@@ -1711,7 +1711,7 @@ class testcase extends control
|
||||
}
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($this->session->project);
|
||||
}
|
||||
|
||||
+21
-21
@@ -47,7 +47,7 @@ class testcaseModel extends model
|
||||
->add('fromBug', $bugID)
|
||||
->setDefault('openedBy', $this->app->user->account)
|
||||
->setDefault('openedDate', $now)
|
||||
->setIF($this->config->systemMode == 'new' and $this->app->openApp == 'project', 'project', $this->session->project)
|
||||
->setIF($this->config->systemMode == 'new' and $this->app->tab == 'project', 'project', $this->session->project)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion((int)$this->post->story))
|
||||
->remove('steps,expects,files,labels,stepType,forceNotReview')
|
||||
->setDefault('story', 0)
|
||||
@@ -144,7 +144,7 @@ class testcaseModel extends model
|
||||
|
||||
$data[$i] = new stdclass();
|
||||
$data[$i]->product = $productID;
|
||||
if($this->config->systemMode == 'new' && $this->app->openApp == 'project') $data[$i]->project = $this->session->project;
|
||||
if($this->config->systemMode == 'new' && $this->app->tab == 'project') $data[$i]->project = $this->session->project;
|
||||
$data[$i]->branch = $cases->branch[$i];
|
||||
$data[$i]->module = $cases->module[$i];
|
||||
$data[$i]->type = $cases->type[$i];
|
||||
@@ -208,8 +208,8 @@ class testcaseModel extends model
|
||||
|
||||
$this->loadModel('score')->create('testcase', 'create', $caseID);
|
||||
$actionID = $this->loadModel('action')->create('case', $caseID, 'Opened');
|
||||
if($this->app->openApp == 'project') $this->action->create('case', $caseID, 'linked2project', '', $this->session->project);
|
||||
if($this->app->openApp == 'execution') $this->action->create('case', $caseID, 'linked2execution', '', $this->session->execution);
|
||||
if($this->app->tab == 'project') $this->action->create('case', $caseID, 'linked2project', '', $this->session->project);
|
||||
if($this->app->tab == 'execution') $this->action->create('case', $caseID, 'linked2execution', '', $this->session->execution);
|
||||
}
|
||||
if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchCreate');
|
||||
return $caseIDList;
|
||||
@@ -231,7 +231,7 @@ class testcaseModel extends model
|
||||
return $this->dao->select('t1.*, t2.title as storyTitle')->from(TABLE_CASE)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
|
||||
->where('t1.product')->eq((int)$productID)
|
||||
->beginIF($this->app->openApp == 'project')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->app->tab == 'project')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi()
|
||||
->beginIF($browseType == 'wait')->andWhere('t1.status')->eq($browseType)->fi()
|
||||
@@ -262,7 +262,7 @@ class testcaseModel extends model
|
||||
->leftJoin(TABLE_STORY)->alias('t4')->on('t3.story=t4.id')
|
||||
->where('1=1')
|
||||
->beginIF(!empty($productID))->andWhere('t2.product')->eq((int)$productID)->fi()
|
||||
->beginIF($this->app->openApp == 'project')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->app->tab == 'project')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($branch)->andWhere('t2.branch')->eq($branch)->fi()
|
||||
->beginIF($moduleIdList)->andWhere('t2.module')->in($moduleIdList)->fi()
|
||||
->beginIF($browseType == 'wait')->andWhere('t2.status')->eq($browseType)->fi()
|
||||
@@ -337,7 +337,7 @@ class testcaseModel extends model
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
|
||||
->leftJoin(TABLE_SUITECASE)->alias('t3')->on('t1.id=t3.case')
|
||||
->where('t1.product')->eq((int)$productID)
|
||||
->beginIF($this->app->openApp == 'project')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->app->tab == 'project')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->andWhere('t3.suite')->eq((int)$suiteID)
|
||||
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi()
|
||||
@@ -421,7 +421,7 @@ class testcaseModel extends model
|
||||
$cases = array();
|
||||
if($browseType == 'bymodule' or $browseType == 'all' or $browseType == 'wait')
|
||||
{
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$cases = $this->getModuleProjectCases($productID, $branch, $modules, $sort, $pager, $browseType, $auto);
|
||||
}
|
||||
@@ -440,7 +440,7 @@ class testcaseModel extends model
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t2.version > t1.storyVersion')
|
||||
->beginIF(!empty($productID))->andWhere('t1.product')->eq($productID)->fi()
|
||||
->beginIF($this->app->openApp == 'project')->andWhere('t3.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->app->tab == 'project')->andWhere('t3.project')->eq($this->session->project)->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($modules)->andWhere('t1.module')->in($modules)->fi()
|
||||
->beginIF($auto != 'unit')->andWhere('t1.auto')->ne('unit')->fi()
|
||||
@@ -510,16 +510,16 @@ class testcaseModel extends model
|
||||
$caseQuery .= ')';
|
||||
$caseQuery = str_replace('`version`', 't1.`version`', $caseQuery);
|
||||
|
||||
if($this->app->openApp == 'project') $caseQuery = str_replace('`product`', 't2.`product`', $caseQuery);
|
||||
if($this->app->tab == 'project') $caseQuery = str_replace('`product`', 't2.`product`', $caseQuery);
|
||||
|
||||
/* Search criteria under compatible project. */
|
||||
$sql = $this->dao->select('*')->from(TABLE_CASE)->alias('t1');
|
||||
if($this->app->openApp == 'project') $sql->leftJoin(TABLE_PROJECTCASE)->alias('t2')->on('t1.id=t2.case');
|
||||
if($this->app->tab == 'project') $sql->leftJoin(TABLE_PROJECTCASE)->alias('t2')->on('t1.id=t2.case');
|
||||
$cases = $sql
|
||||
->where($caseQuery)
|
||||
->beginIF($this->app->openApp == 'project')->andWhere('t2.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->app->openApp == 'project' and !empty($productID) and $queryProductID != 'all')->andWhere('t2.product')->eq($productID)->fi()
|
||||
->beginIF($this->app->openApp != 'project' and !empty($productID) and $queryProductID != 'all')->andWhere('t1.product')->eq($productID)->fi()
|
||||
->beginIF($this->app->tab == 'project')->andWhere('t2.project')->eq($this->session->project)->fi()
|
||||
->beginIF($this->app->tab == 'project' and !empty($productID) and $queryProductID != 'all')->andWhere('t2.product')->eq($productID)->fi()
|
||||
->beginIF($this->app->tab != 'project' and !empty($productID) and $queryProductID != 'all')->andWhere('t1.product')->eq($productID)->fi()
|
||||
->beginIF($auto != 'unit')->andWhere('t1.auto')->ne('unit')->fi()
|
||||
->beginIF($auto == 'unit')->andWhere('t1.auto')->eq('unit')->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
@@ -1260,7 +1260,7 @@ class testcaseModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->config->systemMode == 'new' && $this->app->openApp == 'project') $caseData->project = $this->session->project;
|
||||
if($this->config->systemMode == 'new' && $this->app->tab == 'project') $caseData->project = $this->session->project;
|
||||
$caseData->version = 1;
|
||||
$caseData->openedBy = $this->app->user->account;
|
||||
$caseData->openedDate = $now;
|
||||
@@ -1376,7 +1376,7 @@ class testcaseModel extends model
|
||||
}
|
||||
|
||||
/* If under the project module, the cases is imported need linking to the project. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($this->session->project)->orderBy('order_desc')->limit(1)->fetch('order');
|
||||
|
||||
@@ -1417,7 +1417,7 @@ class testcaseModel extends model
|
||||
*/
|
||||
public function buildSearchForm($productID, $products, $queryID, $actionURL)
|
||||
{
|
||||
$product = ($this->app->openApp == 'project' and empty($productID)) ? $products : array($productID => $products[$productID]) + array('all' => $this->lang->testcase->allProduct);
|
||||
$product = ($this->app->tab == 'project' and empty($productID)) ? $products : array($productID => $products[$productID]) + array('all' => $this->lang->testcase->allProduct);
|
||||
$this->config->testcase->search['params']['product']['values'] = $product;
|
||||
|
||||
$module = $this->loadModel('tree')->getOptionMenu($productID, 'case', 0);
|
||||
@@ -1502,7 +1502,7 @@ class testcaseModel extends model
|
||||
if($canBatchAction)
|
||||
{
|
||||
$disabled = $canBeChanged ? '' : 'disabled';
|
||||
echo html::checkbox('caseIDList', array($case->id => ''), '', $disabled) . html::a(helper::createLink('testcase', 'view', "caseID=$case->id"), sprintf('%03d', $case->id), '', "data-app='{$this->app->openApp}'");
|
||||
echo html::checkbox('caseIDList', array($case->id => ''), '', $disabled) . html::a(helper::createLink('testcase', 'view', "caseID=$case->id"), sprintf('%03d', $case->id), '', "data-app='{$this->app->tab}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1517,7 +1517,7 @@ class testcaseModel extends model
|
||||
case 'title':
|
||||
if($case->branch) echo "<span class='label label-info label-outline'>{$branches[$case->branch]}</span> ";
|
||||
if($modulePairs and $case->module and isset($modulePairs[$case->module])) echo "<span class='label label-gray label-badge'>{$modulePairs[$case->module]}</span> ";
|
||||
echo $canView ? ($fromCaseID ? html::a($caseLink, $case->title, null, "style='color: $case->color' data-app='{$this->app->openApp}'") . html::a(helper::createLink('testcase', 'view', "caseID=$fromCaseID"), "[<i class='icon icon-share' title='{$this->lang->testcase->fromCase}'></i>#$fromCaseID]", '', "data-app='{$this->app->openApp}'") : html::a($caseLink, $case->title, null, "style='color: $case->color' data-app='{$this->app->openApp}'")) : "<span style='color: $case->color'>$case->title</span>";
|
||||
echo $canView ? ($fromCaseID ? html::a($caseLink, $case->title, null, "style='color: $case->color' data-app='{$this->app->tab}'") . html::a(helper::createLink('testcase', 'view', "caseID=$fromCaseID"), "[<i class='icon icon-share' title='{$this->lang->testcase->fromCase}'></i>#$fromCaseID]", '', "data-app='{$this->app->tab}'") : html::a($caseLink, $case->title, null, "style='color: $case->color' data-app='{$this->app->tab}'")) : "<span style='color: $case->color'>$case->title</span>";
|
||||
break;
|
||||
case 'branch':
|
||||
echo $branches[$case->branch];
|
||||
@@ -1725,11 +1725,11 @@ class testcaseModel extends model
|
||||
{
|
||||
$projects = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->where('story')->eq($case->story)->fetchPairs();
|
||||
}
|
||||
elseif($this->app->openApp == 'project' and empty($case->story))
|
||||
elseif($this->app->tab == 'project' and empty($case->story))
|
||||
{
|
||||
$projects = array($this->session->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution' and empty($case->story))
|
||||
elseif($this->app->tab == 'execution' and empty($case->story))
|
||||
{
|
||||
$projects = array($this->session->execution);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ js::set('productID', $productID);
|
||||
js::set('branch', $branch);
|
||||
js::set('suiteID', $suiteID);
|
||||
?>
|
||||
<?php if($this->app->openApp == 'project'):?>
|
||||
<?php if($this->app->tab == 'project'):?>
|
||||
<style>
|
||||
#subHeader #dropMenu .col-left .list-group {margin-bottom: 0px; padding-top: 10px;}
|
||||
#subHeader #dropMenu .col-left {padding-bottom: 0px;}
|
||||
@@ -56,11 +56,11 @@ js::set('suiteID', $suiteID);
|
||||
<span class="text-muted"><?php echo $lang->testcase->noCase;?></span>
|
||||
<?php if((empty($productID) or common::canModify('product', $product)) and common::hasPriv('testcase', 'create') and $browseType != 'bysuite'):?>
|
||||
<?php $initModule = isset($moduleID) ? (int)$moduleID : 0;?>
|
||||
<?php echo html::a($this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule"), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info' data-app='{$this->app->openApp}'");?>
|
||||
<?php echo html::a($this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule"), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info' data-app='{$this->app->tab}'");?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if(common::hasPriv('testsuite', 'linkCase') and $browseType == 'bysuite'):?>
|
||||
<?php echo html::a($this->createLink('testsuite', 'linkCase', "suiteID=$param"), "<i class='icon icon-plus'></i> " . $lang->testsuite->linkCase, '', "class='btn btn-info' data-app='{$this->app->openApp}'");?>
|
||||
<?php echo html::a($this->createLink('testsuite', 'linkCase', "suiteID=$param"), "<i class='icon icon-plus'></i> " . $lang->testsuite->linkCase, '', "class='btn btn-info' data-app='{$this->app->tab}'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php js::set('flow', $config->global->flow);?>
|
||||
<?php $isProjectApp = $this->app->openApp == 'project'?>
|
||||
<?php $isProjectApp = $this->app->tab == 'project'?>
|
||||
<?php $currentModule = $isProjectApp ? 'project' : 'testcase';?>
|
||||
<?php $currentMethod = $isProjectApp ? 'testcase' : 'browse';?>
|
||||
<?php $projectParam = $isProjectApp ? "projectID={$this->session->project}&" : '';?>
|
||||
@@ -25,7 +25,7 @@
|
||||
if(!empty($moduleID))
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted' data-app='{$this->app->openApp}'");
|
||||
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted' data-app='{$this->app->tab}'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -51,9 +51,9 @@
|
||||
}
|
||||
elseif($hasBrowsePriv and ($menuType == 'all' or $menuType == 'needconfirm' or $menuType == 'wait'))
|
||||
{
|
||||
echo html::a($this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=$menuType"), "<span class='text'>{$menuItem->text}</span>", '', "class='btn btn-link' id='{$menuType}Tab' data-app='{$this->app->openApp}'");
|
||||
echo html::a($this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=$menuType"), "<span class='text'>{$menuItem->text}</span>", '', "class='btn btn-link' id='{$menuType}Tab' data-app='{$this->app->tab}'");
|
||||
}
|
||||
elseif($hasBrowsePriv and $menuType == 'suite' and $this->app->openApp == 'qa')
|
||||
elseif($hasBrowsePriv and $menuType == 'suite' and $this->app->tab == 'qa')
|
||||
{
|
||||
$currentSuiteID = isset($suiteID) ? (int)$suiteID : 0;
|
||||
$currentSuite = zget($suiteList, $currentSuiteID, '');
|
||||
@@ -89,17 +89,17 @@
|
||||
$active = !empty($groupBy) ? 'btn-active-text' : '';
|
||||
|
||||
echo "<div id='groupTab' class='btn-group'>";
|
||||
echo html::a($this->createLink('testcase', 'groupCase', "productID=$productID&branch=$branch&groupBy=story"), "<span class='text'>{$lang->testcase->groupByStories}</span>", '', "class='btn btn-link $active' data-app='{$this->app->openApp}'");
|
||||
echo html::a($this->createLink('testcase', 'groupCase', "productID=$productID&branch=$branch&groupBy=story"), "<span class='text'>{$lang->testcase->groupByStories}</span>", '', "class='btn btn-link $active' data-app='{$this->app->tab}'");
|
||||
echo '</div>';
|
||||
}
|
||||
elseif($hasZeroPriv and $menuType == 'zerocase')
|
||||
{
|
||||
$projectID = $isProjectApp ? $this->session->project : 0;
|
||||
echo html::a($this->createLink('story', 'zeroCase', "productID=$productID&branch=$branch&orderBy=id_desc&projectID=$projectID"), "<span class='text'>{$lang->story->zeroCase}</span>", '', "class='btn btn-link' id='zerocaseTab' data-app='{$this->app->openApp}'");
|
||||
echo html::a($this->createLink('story', 'zeroCase', "productID=$productID&branch=$branch&orderBy=id_desc&projectID=$projectID"), "<span class='text'>{$lang->story->zeroCase}</span>", '', "class='btn btn-link' id='zerocaseTab' data-app='{$this->app->tab}'");
|
||||
}
|
||||
elseif($hasUnitPriv and $menuType == 'browseunits')
|
||||
{
|
||||
echo html::a($this->createLink('testtask', 'browseUnits', "productID=$productID"), "<span class='text'>{$lang->testcase->browseUnits}</span>", '', "class='btn btn-link' id='browseunitsTab' data-app='{$this->app->openApp}'");
|
||||
echo html::a($this->createLink('testtask', 'browseUnits', "productID=$productID"), "<span class='text'>{$lang->testcase->browseUnits}</span>", '', "class='btn btn-link' id='browseunitsTab' data-app='{$this->app->tab}'");
|
||||
}
|
||||
?>
|
||||
<?php endforeach;?>
|
||||
@@ -120,12 +120,12 @@
|
||||
$class = common::hasPriv('testcase', 'export') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy&taskID=0&browseType=$browseType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->export, '', $misc . "data-app={$this->app->openApp}") . "</li>";
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->export, '', $misc . "data-app={$this->app->tab}") . "</li>";
|
||||
|
||||
$class = common::hasPriv('testcase', 'exportTemplet') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID=$productID") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->exportTemplet, '', $misc . "data-app={$this->app->openApp} data-width='50%'") . "</li>";
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->exportTemplet, '', $misc . "data-app={$this->app->tab} data-width='50%'") . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -139,12 +139,12 @@
|
||||
$class = common::hasPriv('testcase', 'import') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'import') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'import') ? $this->createLink('testcase', 'import', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->fileImport, '', $misc . "data-app={$this->app->openApp}") . "</li>";
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->fileImport, '', $misc . "data-app={$this->app->tab}") . "</li>";
|
||||
|
||||
$class = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'importFromLib') ? "data-app='{$this->app->openApp}'" : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'importFromLib') ? "data-app='{$this->app->tab}'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->importFromLib, '', $misc . "data-app={$this->app->openApp}") . "</li>";
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->importFromLib, '', $misc . "data-app={$this->app->tab}") . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -170,18 +170,18 @@
|
||||
}
|
||||
|
||||
$hidden = empty($buttonLink) ? 'hidden' : '';
|
||||
echo html::a($buttonLink, "<i class='icon-plus'></i> " . $buttonTitle, '', "class='btn btn-primary $hidden' data-app='{$this->app->openApp}'");
|
||||
echo html::a($buttonLink, "<i class='icon-plus'></i> " . $buttonTitle, '', "class='btn btn-primary $hidden' data-app='{$this->app->tab}'");
|
||||
?>
|
||||
<?php if(!empty($productID) and common::hasPriv('testcase', 'batchCreate') and common::hasPriv('testcase', 'create')):?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<li><?php echo html::a($createTestcaseLink, $lang->testcase->create);?></li>
|
||||
<li><?php echo html::a($batchCreateLink, $lang->testcase->batchCreate, '', "data-app='{$this->app->openApp}'");?></li>
|
||||
<li><?php echo html::a($batchCreateLink, $lang->testcase->batchCreate, '', "data-app='{$this->app->tab}'");?></li>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php if($this->app->rawMethod == 'browseunits' and (empty($productID) or common::canModify('product', $product))):?>
|
||||
<?php common::printLink('testtask', 'importUnitResult', "product=$productID", "<i class='icon icon-import'></i> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary' data-app='{$this->app->openApp}'");?>
|
||||
<?php common::printLink('testtask', 'importUnitResult', "product=$productID", "<i class='icon icon-import'></i> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary' data-app='{$this->app->tab}'");?>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
<div class='btn-group dropdown-hover'>
|
||||
@@ -195,7 +195,7 @@
|
||||
<li <?php echo $disabled?>>
|
||||
<?php
|
||||
$batchLink = $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule");
|
||||
echo "<li>" . html::a($batchLink, "<i class='icon icon-plus'></i> " . $lang->testcase->batchCreate, '', "data-app='{$this->app->openApp}'") . "</li>";
|
||||
echo "<li>" . html::a($batchLink, "<i class='icon icon-plus'></i> " . $lang->testcase->batchCreate, '', "data-app='{$this->app->tab}'") . "</li>";
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php js::set('openApp', $app->openApp);?>
|
||||
<?php js::set('tab', $app->tab);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->testcase->createBug;?></h2>
|
||||
@@ -32,7 +32,7 @@ function createBug(obj)
|
||||
var onlybody = config.onlybody;
|
||||
config.onlybody = 'no';
|
||||
var link = createLink('bug', 'create', params + ',stepIdList=' + stepIdList);
|
||||
if(openApp == 'my')
|
||||
if(tab == 'my')
|
||||
{
|
||||
window.parent.$.apps.open(link, 'qa');
|
||||
}
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php $browseLink = $app->session->caseList ? $app->session->caseList : $this->createLink('testcase', 'browse', "productID=$case->product");?>
|
||||
<?php js::set('sysurl', common::getSysUrl());?>
|
||||
<?php js::set('openApp', $app->openApp);?>
|
||||
<?php js::set('tab', $app->tab);?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php if(!isonlybody()):?>
|
||||
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary' data-app={$this->app->openApp}");?>
|
||||
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary' data-app={$this->app->tab}");?>
|
||||
<div class="divider"></div>
|
||||
<?php endif;?>
|
||||
<div class="page-title">
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
if($this->app->openApp == 'qa' || $this->app->openApp == 'ops')
|
||||
if($this->app->tab == 'qa' || $this->app->tab == 'ops')
|
||||
{
|
||||
if($isLibCase)
|
||||
{
|
||||
@@ -189,8 +189,8 @@
|
||||
if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
}
|
||||
}
|
||||
if($this->app->openApp == 'project' and !common::printLink('project', 'testcase', "projectID={$this->session->project}&productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
if($this->app->openApp == 'execution') echo $module->name;
|
||||
if($this->app->tab == 'project' and !common::printLink('project', 'testcase', "projectID={$this->session->project}&productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
if($this->app->tab == 'execution') echo $module->name;
|
||||
if(isset($modulePath[$key + 1])) echo $lang->arrow;
|
||||
}
|
||||
}
|
||||
@@ -203,7 +203,7 @@
|
||||
<td>
|
||||
<?php
|
||||
$class = isonlybody() ? 'showinonlybody' : 'iframe';
|
||||
$param = $this->app->openApp == 'project' ? "&version=0&projectID={$this->session->project}" : '';
|
||||
$param = $this->app->tab == 'project' ? "&version=0&projectID={$this->session->project}" : '';
|
||||
if(isset($case->storyTitle)) echo html::a($this->createLink('story', 'view', "storyID=$case->story" . $param, '', true), "#$case->story:$case->storyTitle", '', "class=$class data-width='80%'");
|
||||
if($case->story and $case->storyStatus == 'active' and $case->latestStoryVersion > $case->storyVersion)
|
||||
{
|
||||
|
||||
@@ -47,15 +47,15 @@ class testreport extends control
|
||||
/* Get product data. */
|
||||
$products = array();
|
||||
$objectID = 0;
|
||||
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
|
||||
$tab = ($this->app->tab == 'project' or $this->app->tab == 'execution') ? $this->app->tab : 'qa';
|
||||
if(!isonlybody())
|
||||
{
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$objectID = $this->session->project;
|
||||
$products = $this->loadModel('project')->getProducts($objectID, false);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$objectID = $this->session->execution;
|
||||
$products = $this->loadModel('execution')->getProducts($objectID, false);
|
||||
@@ -64,7 +64,7 @@ class testreport extends control
|
||||
{
|
||||
$products = $this->product->getPairs();
|
||||
}
|
||||
if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&objectID=$objectID")));
|
||||
if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$tab&activeMenu=testreport&objectID=$objectID")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -126,7 +126,7 @@ class testreport extends control
|
||||
if($param) $this->locate($this->createLink('testreport', 'create', $param));
|
||||
}
|
||||
|
||||
$this->session->set('reportList', $this->app->getURI(true), $this->app->openApp);
|
||||
$this->session->set('reportList', $this->app->getURI(true), $this->app->tab);
|
||||
|
||||
$executions = array();
|
||||
$tasks = array();
|
||||
@@ -205,8 +205,8 @@ class testreport extends control
|
||||
}
|
||||
$this->view->taskPairs = $taskPairs;
|
||||
|
||||
if($this->app->openApp == 'execution') $this->execution->setMenu($task->execution);
|
||||
if($this->app->openApp == 'project') $this->project->setMenu($task->project);
|
||||
if($this->app->tab == 'execution') $this->execution->setMenu($task->execution);
|
||||
if($this->app->tab == 'project') $this->project->setMenu($task->project);
|
||||
}
|
||||
|
||||
if(empty($objectID)) die(js::alert($this->lang->testreport->noObjectID) . js::locate('back'));
|
||||
@@ -272,12 +272,12 @@ class testreport extends control
|
||||
die(js::locate('back'));
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'qa')
|
||||
if($this->app->tab == 'qa')
|
||||
{
|
||||
$productID = $this->product->saveState(key($productIdList), $this->products);
|
||||
$this->loadModel('qa')->setMenu($this->products, $productID);
|
||||
}
|
||||
elseif($this->app->openApp == 'project')
|
||||
elseif($this->app->tab == 'project')
|
||||
{
|
||||
$projects = $this->project->getPairsByProgram();
|
||||
$projectID = $this->project->saveState($execution->project, $projects);
|
||||
@@ -367,7 +367,7 @@ class testreport extends control
|
||||
$begin = !empty($begin) ? date("Y-m-d", strtotime($begin)) : $report->begin;
|
||||
$end = !empty($end) ? date("Y-m-d", strtotime($end)) : $report->end;
|
||||
|
||||
if($this->app->openApp == 'qa' and !empty($report->product))
|
||||
if($this->app->tab == 'qa' and !empty($report->product))
|
||||
{
|
||||
$product = $this->product->getById($report->product);
|
||||
$productID = $this->commonAction($report->product, 'product');
|
||||
@@ -377,9 +377,9 @@ class testreport extends control
|
||||
$this->view->position[] = html::a($browseLink, $product->name);
|
||||
$this->view->position[] = $this->lang->testreport->edit;
|
||||
}
|
||||
elseif($this->app->openApp == 'execution' or $this->app->openApp == 'project')
|
||||
elseif($this->app->tab == 'execution' or $this->app->tab == 'project')
|
||||
{
|
||||
if($this->app->openApp == 'execution')
|
||||
if($this->app->tab == 'execution')
|
||||
{
|
||||
$objectID = $this->commonAction($report->execution, 'execution');
|
||||
if($objectID != $report->execution) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
|
||||
@@ -484,7 +484,7 @@ class testreport extends control
|
||||
|
||||
$browseLink = '';
|
||||
$execution = $this->execution->getById($report->execution);
|
||||
if($this->app->openApp == 'qa' and !empty($report->product))
|
||||
if($this->app->tab == 'qa' and !empty($report->product))
|
||||
{
|
||||
$product = $this->product->getById($report->product);
|
||||
$productID = $this->commonAction($report->product, 'product');
|
||||
@@ -493,9 +493,9 @@ class testreport extends control
|
||||
$browseLink = inlink('browse', "objectID=$productID&objectType=product");
|
||||
$this->view->position[] = html::a($browseLink, $product->name);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution' or $this->app->openApp == 'project')
|
||||
elseif($this->app->tab == 'execution' or $this->app->tab == 'project')
|
||||
{
|
||||
if($this->app->openApp == 'execution')
|
||||
if($this->app->tab == 'execution')
|
||||
{
|
||||
$objectID = $this->commonAction($report->execution, 'execution');
|
||||
if($objectID != $report->execution) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
<?php foreach($reports as $report):?>
|
||||
<tr>
|
||||
<?php $viewLink = helper::createLink('testreport', 'view', "reportID=$report->id");?>
|
||||
<td><?php echo html::a($viewLink, sprintf('%03d', $report->id), '', "data-app='{$this->app->openApp}'");?></td>
|
||||
<td class='text-left' title='<?php $report->title?>'><?php echo html::a($viewLink, $report->title, '', "data-app='{$this->app->openApp}'")?></td>
|
||||
<td><?php echo html::a($viewLink, sprintf('%03d', $report->id), '', "data-app='{$this->app->tab}'");?></td>
|
||||
<td class='text-left' title='<?php $report->title?>'><?php echo html::a($viewLink, $report->title, '', "data-app='{$this->app->tab}'")?></td>
|
||||
<td><?php echo zget($users, $report->createdBy);?></td>
|
||||
<td><?php echo substr($report->createdDate, 2);?></td>
|
||||
<?php $executionName = $report->execution ? '#' . $report->execution . zget($executions, $report->execution, '') : '';?>
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
if(common::canBeChanged('report', $report))
|
||||
{
|
||||
$extra = $report->objectType == 'execution' ? "&extra=$report->tasks" : '';
|
||||
if(common::hasPriv('testreport', 'create')) echo html::a(inLink('create', "objectID=$report->objectID&objectType=$report->objectType" . $extra), "<i class='icon-refresh'></i>", '', "class='btn' title='{$lang->testreport->recreate}' data-app='{$this->app->openApp}'");
|
||||
if(common::hasPriv('testreport', 'create')) echo html::a(inLink('create', "objectID=$report->objectID&objectType=$report->objectType" . $extra), "<i class='icon-refresh'></i>", '', "class='btn' title='{$lang->testreport->recreate}' data-app='{$this->app->tab}'");
|
||||
common::printIcon('testreport', 'edit', "reportID=$report->id", '', 'button');
|
||||
common::printIcon('testreport', 'delete', "reportID=$report->id", '', 'button', 'trash', 'hiddenwin');
|
||||
}
|
||||
|
||||
+35
-35
@@ -42,15 +42,15 @@ class testtask extends control
|
||||
/* Get product data. */
|
||||
$products = array();
|
||||
$objectID = 0;
|
||||
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
|
||||
$tab = ($this->app->tab == 'project' or $this->app->tab == 'execution') ? $this->app->tab : 'qa';
|
||||
if(!isonlybody())
|
||||
{
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$objectID = $this->session->project;
|
||||
$products = $this->loadModel('project')->getProducts($objectID, false);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$objectID = $this->session->execution;
|
||||
$products = $this->loadModel('execution')->getProducts($objectID, false);
|
||||
@@ -59,7 +59,7 @@ class testtask extends control
|
||||
{
|
||||
$products = $this->product->getPairs();
|
||||
}
|
||||
if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID")));
|
||||
if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$tab&activeMenu=testtask&objectID=$objectID")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -155,14 +155,14 @@ class testtask extends control
|
||||
{
|
||||
/* Save session. */
|
||||
$this->session->set('testtaskList', $this->app->getURI(true), 'qa');
|
||||
$this->session->set('caseList', $this->app->getURI(true), $this->app->openApp);
|
||||
$this->session->set('buildList', $this->app->getURI(true) . '#app=' . $this->app->openApp, 'execution');
|
||||
$this->session->set('caseList', $this->app->getURI(true), $this->app->tab);
|
||||
$this->session->set('buildList', $this->app->getURI(true) . '#app=' . $this->app->tab, 'execution');
|
||||
$this->loadModel('testcase');
|
||||
$this->app->loadLang('tree');
|
||||
|
||||
/* Set menu. */
|
||||
$productID = $this->loadModel('product')->saveState($productID, $this->products);
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->lang->scrum->menu->qa['subMenu']->testcase['subModule'] = 'testtask';
|
||||
$this->lang->scrum->menu->qa['subMenu']->testtask['subModule'] = '';
|
||||
@@ -228,22 +228,22 @@ class testtask extends control
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $taskID));
|
||||
|
||||
$task = $this->dao->findById($taskID)->from(TABLE_TESTTASK)->fetch();
|
||||
if($this->app->openApp == 'project') $link = $this->createLink('project', 'testtask', "projectID=$task->project");
|
||||
if($this->app->openApp == 'execution') $link = $this->createLink('execution', 'testtask', "executionID=$task->execution");
|
||||
if($this->app->openApp == 'qa') $link = $this->createLink('testtask', 'browse', "productID=$productID");
|
||||
if($this->app->tab == 'project') $link = $this->createLink('project', 'testtask', "projectID=$task->project");
|
||||
if($this->app->tab == 'execution') $link = $this->createLink('execution', 'testtask', "executionID=$task->execution");
|
||||
if($this->app->tab == 'qa') $link = $this->createLink('testtask', 'browse', "productID=$productID");
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link));
|
||||
}
|
||||
|
||||
/* Set menu. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($executionID);
|
||||
}
|
||||
elseif($this->app->openApp == 'qa')
|
||||
elseif($this->app->tab == 'qa')
|
||||
{
|
||||
$this->loadModel('qa')->setMenu($this->products, $productID);
|
||||
}
|
||||
@@ -313,15 +313,15 @@ class testtask extends control
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug');
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($task->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($task->execution);
|
||||
}
|
||||
elseif($this->app->openApp == 'qa')
|
||||
elseif($this->app->tab == 'qa')
|
||||
{
|
||||
$this->loadModel('qa')->setMenu($this->products, $productID, $task->branch, $taskID);
|
||||
}
|
||||
@@ -358,7 +358,7 @@ class testtask extends control
|
||||
|
||||
/* Set browseType, productID, moduleID and queryID. */
|
||||
$productID = $this->product->saveState($task->product, $this->products);
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->lang->scrum->menu->qa['subMenu']->testcase['subModule'] = 'testtask';
|
||||
$this->lang->scrum->menu->qa['subMenu']->testtask['subModule'] = '';
|
||||
@@ -470,11 +470,11 @@ class testtask extends control
|
||||
if(!$task) die(js::error($this->lang->testtask->checkLinked) . js::locate('back'));
|
||||
|
||||
$productID = $task->product;
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($task->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($task->execution);
|
||||
}
|
||||
@@ -598,11 +598,11 @@ class testtask extends control
|
||||
}
|
||||
}
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($task->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($task->execution);
|
||||
}
|
||||
@@ -649,11 +649,11 @@ class testtask extends control
|
||||
$task = $this->testtask->getById($taskID);
|
||||
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
$productID = $task->product;
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($this->session->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($task->execution);
|
||||
}
|
||||
@@ -742,12 +742,12 @@ class testtask extends control
|
||||
}
|
||||
|
||||
/* Set menu. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($task->project);
|
||||
$this->lang->modulePageNav = $this->product->select($this->products, $productID, 'testtask', 'browseUnits');
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($task->execution);
|
||||
}
|
||||
@@ -985,8 +985,8 @@ class testtask extends control
|
||||
}
|
||||
|
||||
$browseList = $this->createLink('testtask', 'browse', "productID=$task->product");
|
||||
if($this->app->openApp == 'execution') $browseList = $this->createLink('execution', 'testtask', "executionID=$task->execution");
|
||||
if($this->app->openApp == 'project') $browseList = $this->createLink('project', 'testtask', "projectID=$task->project");
|
||||
if($this->app->tab == 'execution') $browseList = $this->createLink('execution', 'testtask', "executionID=$task->execution");
|
||||
if($this->app->tab == 'project') $browseList = $this->createLink('project', 'testtask', "projectID=$task->project");
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success'));
|
||||
die(js::locate($browseList, 'parent'));
|
||||
}
|
||||
@@ -1015,11 +1015,11 @@ class testtask extends control
|
||||
$productID = $this->product->saveState($task->product, $this->products);
|
||||
|
||||
/* Save session. */
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($task->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($task->execution);
|
||||
}
|
||||
@@ -1240,13 +1240,13 @@ class testtask extends control
|
||||
$caseIDList = array_unique($caseIDList);
|
||||
|
||||
/* The case of tasks of qa. */
|
||||
if($productID or ($this->app->openApp == 'project' and empty($productID)))
|
||||
if($productID or ($this->app->tab == 'project' and empty($productID)))
|
||||
{
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($this->session->project);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($this->session->execution);
|
||||
}
|
||||
@@ -1261,7 +1261,7 @@ class testtask extends control
|
||||
/* The case of my. */
|
||||
else
|
||||
{
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($this->session->project);
|
||||
}
|
||||
@@ -1385,7 +1385,7 @@ class testtask extends control
|
||||
|
||||
/* Set menu. */
|
||||
$productID = $this->loadModel('product')->saveState($productID, $this->products);
|
||||
if($this->app->openApp == 'project')
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$this->lang->scrum->menu->qa['subMenu']->testcase['subModule'] = 'testtask';
|
||||
$this->lang->scrum->menu->qa['subMenu']->testtask['subModule'] = '';
|
||||
@@ -1408,7 +1408,7 @@ class testtask extends control
|
||||
$this->app->loadLang('job');
|
||||
$this->app->rawModule = 'testcase';
|
||||
|
||||
$projectID = $this->app->openApp == 'qa' ? 0 : $this->session->project;
|
||||
$projectID = $this->app->tab == 'qa' ? 0 : $this->session->project;
|
||||
$executions = empty($productID) ? array() : $this->loadModel('product')->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
|
||||
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk');
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ function createBug(obj)
|
||||
|
||||
var link = createLink('bug', 'create', params + ',stepIdList=' + stepIdList);
|
||||
if(onlybody = 'yes') link += '#app=qa';
|
||||
if(openApp == 'my')
|
||||
if(tab == 'my')
|
||||
{
|
||||
window.parent.$.apps.open(link, 'qa');
|
||||
}
|
||||
|
||||
@@ -890,10 +890,10 @@ class testtaskModel extends model
|
||||
$this->dao->replace(TABLE_TESTRUN)->data($row)->exec();
|
||||
|
||||
/* When the cases linked the testtask, the cases link to the project. */
|
||||
if($this->app->openApp != 'qa')
|
||||
if($this->app->tab != 'qa')
|
||||
{
|
||||
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($projectID)->orderBy('order_desc')->limit(1)->fetch('order');
|
||||
$project = $this->app->openApp == 'project' ? $this->session->project : $this->session->execution;
|
||||
$project = $this->app->tab == 'project' ? $this->session->project : $this->session->execution;
|
||||
|
||||
$data = new stdclass();
|
||||
$data->project = $project;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class='panel-body'>
|
||||
<div class='list-group'>
|
||||
<?php foreach($lang->testtask->unitTag as $key => $label):?>
|
||||
<?php echo html::a(inlink('browseUnits', "productID=$productID&browseType=$key&orderBy=$orderBy"), "<span class='text'>$label</span>", '', "id='{$key}UnitTab' class='btn btn-link' data-app='{$this->app->openApp}'");?>
|
||||
<?php echo html::a(inlink('browseUnits', "productID=$productID&browseType=$key&orderBy=$orderBy"), "<span class='text'>$label</span>", '', "id='{$key}UnitTab' class='btn btn-link' data-app='{$this->app->tab}'");?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -62,7 +62,7 @@
|
||||
<?php foreach($tasks as $task):?>
|
||||
<tr class='text-left'>
|
||||
<td><?php printf('%03d', $task->id);?></td>
|
||||
<td class='c-name' title="<?php echo $task->name?>"><?php echo html::a(inlink('unitCases', "taskID=$task->id"), $task->name, '', "data-app={$this->app->openApp}");?></td>
|
||||
<td class='c-name' title="<?php echo $task->name?>"><?php echo html::a(inlink('unitCases', "taskID=$task->id"), $task->name, '', "data-app={$this->app->tab}");?></td>
|
||||
<td class='c-name' title="<?php echo $task->executionName?>"><?php echo $task->executionName?></td>
|
||||
<td class='c-name' title="<?php echo $task->buildName;?>"><?php echo ($task->build == 'trunk' || empty($task->buildName)) ? $lang->trunk : html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName, '', 'data-app="execution"');?></td>
|
||||
<td><?php echo zget($users, $task->owner);?></td>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
$hasGroupPriv = common::hasPriv('testtask', 'groupcase');
|
||||
?>
|
||||
<?php
|
||||
if($hasCasesPriv) echo html::a($this->inlink('cases', "taskID=$taskID&browseType=all¶m=0"), "<span class='text'>{$lang->testtask->allCases}</span>", '', "id='allTab' class='btn btn-link' data-app='{$app->openApp}'");
|
||||
if($hasCasesPriv) echo html::a($this->inlink('cases', "taskID=$taskID&browseType=assignedtome¶m=0"), "<span class='text'>{$lang->testtask->assignedToMe}</span>", '', "id='assignedtomeTab' class='btn btn-link' data-app='{$app->openApp}'");
|
||||
if($hasCasesPriv) echo html::a($this->inlink('cases', "taskID=$taskID&browseType=all¶m=0"), "<span class='text'>{$lang->testtask->allCases}</span>", '', "id='allTab' class='btn btn-link' data-app='{$app->tab}'");
|
||||
if($hasCasesPriv) echo html::a($this->inlink('cases', "taskID=$taskID&browseType=assignedtome¶m=0"), "<span class='text'>{$lang->testtask->assignedToMe}</span>", '', "id='assignedtomeTab' class='btn btn-link' data-app='{$app->tab}'");
|
||||
|
||||
if($hasGroupPriv)
|
||||
{
|
||||
@@ -27,7 +27,7 @@
|
||||
$active = !empty($groupBy) ? 'btn-active-text' : '';
|
||||
|
||||
echo "<div id='groupTab' class='btn-group'>";
|
||||
echo html::a($this->createLink('testtask', 'groupCase', "taskID=$taskID&groupBy=story"), "<span class='text'>{$lang->testcase->groupByStories}</span>", '', "class='btn btn-link $active' data-app='{$app->openApp}'");
|
||||
echo html::a($this->createLink('testtask', 'groupCase', "taskID=$taskID&groupBy=story"), "<span class='text'>{$lang->testcase->groupByStories}</span>", '', "class='btn btn-link $active' data-app='{$app->tab}'");
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php js::set('openApp', $app->openApp);?>
|
||||
<?php js::set('tab', $app->tab);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
@@ -51,13 +51,13 @@
|
||||
<td class='w-60px'><?php if(!empty($result->files)) echo html::a("#caseResult{$result->id}", $lang->files . $fileCount, '', "data-toggle='modal' data-type='iframe'")?></td>
|
||||
<td class='w-50px text-center'><i class='collapse-handle icon-angle-down text-muted'></i></td>
|
||||
</tr>
|
||||
<?php $executionParam = ($this->app->openApp == 'execution' and isset($testtask)) ? "executionID=$testtask->execution" : "";?>
|
||||
<?php $executionParam = ($this->app->tab == 'execution' and isset($testtask)) ? "executionID=$testtask->execution" : "";?>
|
||||
<?php $params = isset($testtask) ? ",testtask=$testtask->id" : "";?>
|
||||
<?php $params = $params . ",buildID=" . (isset($testtask->build) ? $testtask->build : $result->build);?>
|
||||
<?php if($executionParam) $params .= ',' . $executionParam;?>
|
||||
<tr class='result-detail hide' id='tr-detail_<?php echo $trCount++; ?>'>
|
||||
<td colspan='7' class='pd-0'>
|
||||
<?php $projectParam = $this->app->openApp == 'project' ? "projectID={$this->session->project}," : ''?>
|
||||
<?php $projectParam = $this->app->tab == 'project' ? "projectID={$this->session->project}," : ''?>
|
||||
<form data-params='<?php echo "product=$case->product&branch=$case->branch&extras={$projectParam}caseID=$case->id,version=$case->version,resultID=$result->id,runID=$result->run" . $params?>' method='post'>
|
||||
<table class='table table-condensed resultSteps'>
|
||||
<thead>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/form.html.php';?>
|
||||
<?php js::set('caseResultSave', $lang->save);?>
|
||||
<?php js::set('openApp', $app->openApp);?>
|
||||
<?php js::set('tab', $app->tab);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
|
||||
@@ -25,7 +25,7 @@ js::set('flow', $config->global->flow);
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php $browseLink = $this->session->testtaskList ? $this->session->testtaskList : $this->createLink('testtask', 'browseUnits');?>
|
||||
<?php echo html::a($browseLink, '<i class="icon-goback icon-back"></i> ' . $lang->goback, '', "class='btn btn-secondary' data-app={$this->app->openApp}");?>
|
||||
<?php echo html::a($browseLink, '<i class="icon-goback icon-back"></i> ' . $lang->goback, '', "class='btn btn-secondary' data-app={$this->app->tab}");?>
|
||||
<?php if(isonlybody()) echo "<div class='page-title'>{$task->name}</div>";?>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right <?php if(isonlybody()) echo 'hidden';?>'>
|
||||
|
||||
@@ -28,16 +28,16 @@ class tree extends control
|
||||
{
|
||||
$this->loadModel('product');
|
||||
|
||||
if($this->app->openApp == 'product')
|
||||
if($this->app->tab == 'product')
|
||||
{
|
||||
$this->product->setMenu($rootID, 0, 0, '', $viewType);
|
||||
}
|
||||
else if($this->app->openApp == 'qa' and $viewType != 'caselib')
|
||||
else if($this->app->tab == 'qa' and $viewType != 'caselib')
|
||||
{
|
||||
$products = $this->product->getPairs('noclosed');
|
||||
$this->loadModel('qa')->setMenu($products, $rootID, 0, $viewType);
|
||||
}
|
||||
else if($this->app->openApp == 'project')
|
||||
else if($this->app->tab == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($this->session->project);
|
||||
}
|
||||
|
||||
@@ -739,9 +739,9 @@ class treeModel extends model
|
||||
|
||||
/* Get module according to product. */
|
||||
$productNum = count($products);
|
||||
$moduleName = $this->app->openApp == 'project' ? 'project' : 'testcase';
|
||||
$methodName = $this->app->openApp == 'project' ? 'testcase' : 'browse';
|
||||
$projectParam = $this->app->openApp == 'project' ? "projectID={$this->session->project}&" : '';
|
||||
$moduleName = $this->app->tab == 'project' ? 'project' : 'testcase';
|
||||
$methodName = $this->app->tab == 'project' ? 'testcase' : 'browse';
|
||||
$projectParam = $this->app->tab == 'project' ? "projectID={$this->session->project}&" : '';
|
||||
foreach($products as $id => $product)
|
||||
{
|
||||
$extra['productID'] = $id;
|
||||
@@ -1199,10 +1199,10 @@ class treeModel extends model
|
||||
*/
|
||||
public function createCaseLink($type, $module)
|
||||
{
|
||||
$moduleName = $this->app->openApp == 'project' ? 'project' : 'testcase';
|
||||
$methodName = $this->app->openApp == 'project' ? 'testcase' : 'browse';
|
||||
$projectParam = $this->app->openApp == 'project' ? "projectID={$this->session->project}&" : '';
|
||||
return html::a(helper::createLink($moduleName, $methodName, $projectParam . "root={$module->root}&branch=&type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}' data-app='{$this->app->openApp}'");
|
||||
$moduleName = $this->app->tab == 'project' ? 'project' : 'testcase';
|
||||
$methodName = $this->app->tab == 'project' ? 'testcase' : 'browse';
|
||||
$projectParam = $this->app->tab == 'project' ? "projectID={$this->session->project}&" : '';
|
||||
return html::a(helper::createLink($moduleName, $methodName, $projectParam . "root={$module->root}&branch=&type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}' data-app='{$this->app->tab}'");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -91,10 +91,10 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete] {display: none
|
||||
<?php if($viewType != 'line' && $viewType != 'trainskill' && $viewType != 'trainpost'):?>
|
||||
<td class="text-middle text-right with-padding">
|
||||
<?php
|
||||
echo "<span>" . html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType¤tModuleID=0&branch=0&from=$from", '', ''), empty($root->name) ? '' : $root->name, '', "data-app='{$this->app->openApp}'") . "<i class='icon icon-angle-right muted'></i></span>";
|
||||
echo "<span>" . html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType¤tModuleID=0&branch=0&from=$from", '', ''), empty($root->name) ? '' : $root->name, '', "data-app='{$this->app->tab}'") . "<i class='icon icon-angle-right muted'></i></span>";
|
||||
foreach($parentModules as $module)
|
||||
{
|
||||
echo "<span>" . html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType¤tModuleID=$module->id&branch=0&from=$from"), $module->name, '', "data-app='{$this->app->openApp}'") . " <i class='icon icon-angle-right muted'></i></span>";
|
||||
echo "<span>" . html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType¤tModuleID=$module->id&branch=0&from=$from"), $module->name, '', "data-app='{$this->app->tab}'") . " <i class='icon icon-angle-right muted'></i></span>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -172,7 +172,7 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete] {display: none
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('openApp', $this->app->openApp);?>
|
||||
<?php js::set('tab', $this->app->tab);?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
@@ -192,7 +192,7 @@ $(function()
|
||||
},
|
||||
itemCreator: function($li, item)
|
||||
{
|
||||
var link = (item.id !== undefined && item.type != 'line') ? ('<a href="' + createLink('tree', 'browse', 'rootID=<?php echo $rootID ?>&viewType=<?php echo $viewType ?>&moduleID={0}&branch={1}&from=<?php echo $from;?>'.format(item.id, item.branch)) + '" data-app="' + openApp + '">' + item.name + '</a>') : ('<span class="tree-toggle">' + item.name + '</span>');
|
||||
var link = (item.id !== undefined && item.type != 'line') ? ('<a href="' + createLink('tree', 'browse', 'rootID=<?php echo $rootID ?>&viewType=<?php echo $viewType ?>&moduleID={0}&branch={1}&from=<?php echo $from;?>'.format(item.id, item.branch)) + '" data-app="' + tab + '">' + item.name + '</a>') : ('<span class="tree-toggle">' + item.name + '</span>');
|
||||
var $toggle = $('<span class="module-name" data-id="' + item.id + '">' + link + '</span>');
|
||||
if(item.type === 'bug') $toggle.append(' <span class="text-muted">[B]</span>');
|
||||
if(item.type === 'case') $toggle.append(' <span class="text-muted">[C]</span>');
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('openApp', $app->openApp);?>
|
||||
<?php js::set('tab', $app->tab);?>
|
||||
<style>
|
||||
li.story-item > .tree-actions .tree-action[data-type=sort] {display: none;}
|
||||
li.story-item > .tree-actions .tree-action[data-type=edit] {display: none;}
|
||||
@@ -51,10 +51,10 @@ li.story-item > .tree-actions .tree-action[data-type=delete] {display: none;}
|
||||
<tr>
|
||||
<td class="text-middle text-right with-padding">
|
||||
<?php
|
||||
echo "<span>" . html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&viewType=task"), $root->name, '', "data-app='{$app->openApp}'") . "<i class='icon icon-angle-right muted'></i></span>";
|
||||
echo "<span>" . html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&viewType=task"), $root->name, '', "data-app='{$app->tab}'") . "<i class='icon icon-angle-right muted'></i></span>";
|
||||
foreach($parentModules as $module)
|
||||
{
|
||||
echo "<span>" . html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&moduleID=$module->id"), $module->name, '', "data-app='{$app->openApp}'") . " <i class='icon icon-angle-right muted'></i></span>";
|
||||
echo "<span>" . html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&moduleID=$module->id"), $module->name, '', "data-app='{$app->tab}'") . " <i class='icon icon-angle-right muted'></i></span>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -139,7 +139,7 @@ $(function()
|
||||
var $toggle = $('<span class="module-name" data-id="' + item.id + '">' + link + '</span>');
|
||||
|
||||
var title = (item.type === 'product' ? '<i class="icon icon-product text-muted"></i> ' : '') + item.name;
|
||||
var link = item.id !== undefined ? ('<a data-app=' + openApp + ' href="' + createLink('tree', 'browsetask', 'rootID=<?php echo $rootID ?>&viewType=task&moduleID={0}'.format(item.id)) + '">' + title + '</a>') : ('<span class="tree-toggle">' + title + '</span>');
|
||||
var link = item.id !== undefined ? ('<a data-app=' + tab + ' href="' + createLink('tree', 'browsetask', 'rootID=<?php echo $rootID ?>&viewType=task&moduleID={0}'.format(item.id)) + '">' + title + '</a>') : ('<span class="tree-toggle">' + title + '</span>');
|
||||
var $toggle = $('<span class="module-name" data-id="' + item.id + '">' + link + '</span>');
|
||||
if(item.type === 'task')
|
||||
{
|
||||
|
||||
@@ -447,7 +447,7 @@ class webhookModel extends model
|
||||
public function getViewLink($objectType, $objectID)
|
||||
{
|
||||
$oldOnlyBody = '';
|
||||
$openApp = '';
|
||||
$tab = '';
|
||||
if(isset($_GET['onlybody']) and $_GET['onlybody'] == 'yes')
|
||||
{
|
||||
$oldOnlyBody = 'yes';
|
||||
@@ -457,10 +457,10 @@ class webhookModel extends model
|
||||
if($objectType == 'meeting')
|
||||
{
|
||||
$meeting = $this->dao->findById($objectID)->from(TABLE_MEETING)->fetch();
|
||||
$openApp = $meeting->project ? '#app=project' : '#app=my';
|
||||
$tab = $meeting->project ? '#app=project' : '#app=my';
|
||||
}
|
||||
|
||||
$viewLink = helper::createLink($objectType, 'view', "id=$objectID", 'html') . $openApp;
|
||||
$viewLink = helper::createLink($objectType, 'view', "id=$objectID", 'html') . $tab;
|
||||
if($oldOnlyBody) $_GET['onlybody'] = $oldOnlyBody;
|
||||
|
||||
return $viewLink;
|
||||
|
||||
Reference in New Issue
Block a user