Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -16,7 +16,7 @@ class baseControl
|
||||
/**
|
||||
* 全局对象 $app。
|
||||
* The global $app object.
|
||||
*
|
||||
*
|
||||
* @var object
|
||||
* @access public
|
||||
*/
|
||||
@@ -25,7 +25,7 @@ class baseControl
|
||||
/**
|
||||
* 应用名称 $appName
|
||||
* The global $appName.
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
@@ -34,7 +34,7 @@ class baseControl
|
||||
/**
|
||||
* 全局对象 $config。
|
||||
* The global $config object.
|
||||
*
|
||||
*
|
||||
* @var object
|
||||
* @access public
|
||||
*/
|
||||
@@ -43,7 +43,7 @@ class baseControl
|
||||
/**
|
||||
* 全局对象 $lang。
|
||||
* The global $lang object.
|
||||
*
|
||||
*
|
||||
* @var object
|
||||
* @access public
|
||||
*/
|
||||
@@ -52,7 +52,7 @@ class baseControl
|
||||
/**
|
||||
* 全局对象 $dbh,数据库连接句柄。
|
||||
* The global $dbh object, the database connection handler.
|
||||
*
|
||||
*
|
||||
* @var object
|
||||
* @access public
|
||||
*/
|
||||
@@ -61,7 +61,7 @@ class baseControl
|
||||
/**
|
||||
* $dao对象,实现sql的拼装和执行。
|
||||
* The $dao object, used to join sql and excute sql.
|
||||
*
|
||||
*
|
||||
* @var object
|
||||
* @access public
|
||||
*/
|
||||
@@ -70,7 +70,7 @@ class baseControl
|
||||
/**
|
||||
* $post对象,用户可以通过$this->post->key来引用$_POST变量。
|
||||
* The $post object, useer can access a post var by $this->post->key.
|
||||
*
|
||||
*
|
||||
* @var object
|
||||
* @access public
|
||||
*/
|
||||
@@ -79,7 +79,7 @@ class baseControl
|
||||
/**
|
||||
* $get对象,用户可以通过$this->get->key来引用$_GET变量。
|
||||
* The $get object, useer can access a get var by $this->get->key.
|
||||
*
|
||||
*
|
||||
* @var object
|
||||
* @access public
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ class baseControl
|
||||
/**
|
||||
* $session对象,用户可以通过$this->session->key来引用$_SESSION变量。
|
||||
* The $session object, useer can access a session var by $this->session->key.
|
||||
*
|
||||
*
|
||||
* @var object
|
||||
* @access public
|
||||
*/
|
||||
@@ -97,7 +97,7 @@ class baseControl
|
||||
/**
|
||||
* $server对象,用户可以通过$this->server->key来引用$_SERVER变量。
|
||||
* The $server object, useer can access a server var by $this->server->key.
|
||||
*
|
||||
*
|
||||
* @var object
|
||||
* @access public
|
||||
*/
|
||||
@@ -106,7 +106,7 @@ class baseControl
|
||||
/**
|
||||
* $cookie对象,用户可以通过$this->cookie->key来引用$_COOKIE变量。
|
||||
* The $cookie object, useer can access a cookie var by $this->cookie->key.
|
||||
*
|
||||
*
|
||||
* @var object
|
||||
* @access public
|
||||
*/
|
||||
@@ -115,7 +115,7 @@ class baseControl
|
||||
/**
|
||||
* 当前模块的名称。
|
||||
* The name of current module.
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
@@ -124,16 +124,16 @@ class baseControl
|
||||
/**
|
||||
* $view用于存放从control传到view视图的数据。
|
||||
* The vars assigned to the view page.
|
||||
*
|
||||
*
|
||||
* @var object
|
||||
* @access public
|
||||
*/
|
||||
public $view;
|
||||
public $view;
|
||||
|
||||
/**
|
||||
* 视图的类型,比如html, json。
|
||||
* The type of the view, such html, json.
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
@@ -142,7 +142,7 @@ class baseControl
|
||||
/**
|
||||
* 输出到浏览器的内容。
|
||||
* The content to display.
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
@@ -151,25 +151,25 @@ class baseControl
|
||||
/**
|
||||
* 客户端设备。
|
||||
* The client device.
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public $clientDevice;
|
||||
|
||||
/**
|
||||
* 不同设备下视图文件的前缀。
|
||||
* The prefix of view file for mobile or PC.
|
||||
*
|
||||
* @var string
|
||||
* The prefix of view file for mobile or PC.
|
||||
*
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public $devicePrefix;
|
||||
|
||||
/**
|
||||
* 构造方法。
|
||||
*
|
||||
* 1. 将全局变量设为baseControl类的成员变量,方便baseControl的派生类调用;
|
||||
* 构造方法。
|
||||
*
|
||||
* 1. 将全局变量设为baseControl类的成员变量,方便baseControl的派生类调用;
|
||||
* 2. 设置当前模块,读取该模块的model类;
|
||||
* 3. 初始化$view视图类。
|
||||
*
|
||||
@@ -178,10 +178,10 @@ class baseControl
|
||||
* 1. global the global vars, refer them by the class member such as $this->app.
|
||||
* 2. set the pathes of current module, and load it's model class.
|
||||
* 3. auto assign the $lang and $config to the view.
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @param string $appName
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @param string $appName
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -234,10 +234,10 @@ class baseControl
|
||||
|
||||
//-------------------- Model相关方法(Model related methods) --------------------//
|
||||
|
||||
/*
|
||||
* 设置模块名。
|
||||
* Set the module name.
|
||||
*
|
||||
/*
|
||||
* 设置模块名。
|
||||
* Set the module name.
|
||||
*
|
||||
* @param string $moduleName 模块名,如果为空,则从$app中获取. The module name, if empty, get it from $app.
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -250,8 +250,8 @@ class baseControl
|
||||
/**
|
||||
* 设置方法名。
|
||||
* Set the method name.
|
||||
*
|
||||
* @param string $methodName 方法名,如果为空,则从$app中获取。The method name, if empty, get it from $app.
|
||||
*
|
||||
* @param string $methodName 方法名,如果为空,则从$app中获取。The method name, if empty, get it from $app.
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -263,7 +263,7 @@ class baseControl
|
||||
/**
|
||||
* 加载指定模块的model文件。
|
||||
* Load the model file of one module.
|
||||
*
|
||||
*
|
||||
* @param string $moduleName 模块名,如果为空,使用当前模块。The module name, if empty, use current module's name.
|
||||
* @param string $appName The app name, if empty, use current app's name.
|
||||
* @access public
|
||||
@@ -286,9 +286,9 @@ class baseControl
|
||||
|
||||
/**
|
||||
* 如果没有model文件,尝试加载config配置信息。
|
||||
* If no model file, try load config.
|
||||
* If no model file, try load config.
|
||||
*/
|
||||
if(!helper::import($modelFile))
|
||||
if(!helper::import($modelFile))
|
||||
{
|
||||
$this->app->loadModuleConfig($moduleName, $appName);
|
||||
$this->app->loadLang($moduleName, $appName);
|
||||
@@ -296,7 +296,7 @@ class baseControl
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 如果没有扩展文件,model类名是$moduleName + 'model',如果有扩展,还需要增加ext前缀。
|
||||
* If no extension file, model class name is $moduleName + 'model', else with 'ext' as the prefix.
|
||||
*/
|
||||
@@ -307,7 +307,7 @@ class baseControl
|
||||
if(!class_exists($modelClass)) $this->app->triggerError(" The model $modelClass not found", __FILE__, __LINE__, $exit = true);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 初始化model对象,在control对象中可以通过$this->$moduleName来引用。同时将dao对象赋为control对象的成员变量,方便引用。
|
||||
* Init the model object thus you can try $this->$moduleName to access it. Also assign the $dao object as a member of control object.
|
||||
*/
|
||||
@@ -320,7 +320,7 @@ class baseControl
|
||||
/**
|
||||
* 设置超级全局变量,方便直接引用。
|
||||
* Set the super vars.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -336,7 +336,7 @@ class baseControl
|
||||
/**
|
||||
* 设置客户端的设备类型。
|
||||
* Set client device.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -362,7 +362,7 @@ class baseControl
|
||||
/**
|
||||
* 设置视图文件:主视图文件,扩展视图文件, 站点扩展视图文件,以及钩子脚本。
|
||||
* Set view files: the main file, extension view file, site extension view file and hook files.
|
||||
*
|
||||
*
|
||||
* @param string $moduleName module name
|
||||
* @param string $methodName method name
|
||||
* @access public
|
||||
@@ -401,15 +401,15 @@ class baseControl
|
||||
/**
|
||||
* 获取某一个视图文件的扩展。
|
||||
* Get the extension file of an view.
|
||||
*
|
||||
* @param string $viewFile
|
||||
*
|
||||
* @param string $viewFile
|
||||
* @access public
|
||||
* @return string|bool If extension view file exists, return the path. Else return fasle.
|
||||
*/
|
||||
public function getExtViewFile($viewFile)
|
||||
{
|
||||
/**
|
||||
* 首先找sitecode下的扩展文件,如果没有,再找ext下的扩展文件。
|
||||
* 首先找sitecode下的扩展文件,如果没有,再找ext下的扩展文件。
|
||||
* Find extViewFile in ext/_$siteCode/view first, then try ext/view/.
|
||||
*/
|
||||
if($this->app->siteCode)
|
||||
@@ -437,9 +437,9 @@ class baseControl
|
||||
/**
|
||||
* 获取适用于当前方法的css:该模块公用的css + 当前方法的css + 扩展的css。
|
||||
* Get css codes applied to current method: module common css + method css + extension css.
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -504,8 +504,8 @@ class baseControl
|
||||
|
||||
/**
|
||||
* Get extension css and extension css with lang.
|
||||
*
|
||||
* @param array $files
|
||||
*
|
||||
* @param array $files
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -556,9 +556,9 @@ class baseControl
|
||||
/**
|
||||
* 获取适用于当前方法的js:该模块公用的js + 当前方法的js + 扩展的js。
|
||||
* Get js codes applied to current method: module common js + method js + extension js.
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -599,14 +599,14 @@ class baseControl
|
||||
if(!empty($jsExtFiles) and is_array($jsExtFiles)) foreach($jsExtFiles as $jsFile) $js .= file_get_contents($jsFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $js;
|
||||
}
|
||||
|
||||
/**
|
||||
* 向$view传递一个变量。
|
||||
* Assign one var to the view vars.
|
||||
*
|
||||
*
|
||||
* @param string $name the name.
|
||||
* @param mixed $value the value.
|
||||
* @access public
|
||||
@@ -631,7 +631,7 @@ class baseControl
|
||||
|
||||
/**
|
||||
* 渲染视图文件。
|
||||
* Parse view file.
|
||||
* Parse view file.
|
||||
*
|
||||
* @param string $moduleName module name, if empty, use current module.
|
||||
* @param string $methodName method name, if empty, use current method.
|
||||
@@ -698,7 +698,7 @@ class baseControl
|
||||
|
||||
/**
|
||||
* 获得当前页面的CSS和JS。
|
||||
* Get css and js codes for current method.
|
||||
* Get css and js codes for current method.
|
||||
*/
|
||||
$css = $this->getCSS($moduleName, $methodName);
|
||||
$js = $this->getJS($moduleName, $methodName);
|
||||
@@ -707,7 +707,7 @@ class baseControl
|
||||
|
||||
/**
|
||||
* 切换到视图文件所在的目录,以保证视图文件里面的include语句能够正常运行。
|
||||
* Change the dir to the view file to keep the relative pathes work.
|
||||
* Change the dir to the view file to keep the relative pathes work.
|
||||
*/
|
||||
$currentPWD = getcwd();
|
||||
chdir(dirname($viewFile));
|
||||
@@ -725,7 +725,7 @@ class baseControl
|
||||
|
||||
/**
|
||||
* 渲染完毕后,再切换回之前的路径。
|
||||
* At the end, chang the dir to the previous.
|
||||
* At the end, chang the dir to the previous.
|
||||
*/
|
||||
chdir($currentPWD);
|
||||
}
|
||||
@@ -752,7 +752,7 @@ class baseControl
|
||||
if($moduleName == '') $moduleName = $this->moduleName;
|
||||
if($methodName == '') $methodName = $this->methodName;
|
||||
if($appName == '') $appName = $this->appName;
|
||||
if($moduleName == $this->moduleName and $methodName == $this->methodName)
|
||||
if($moduleName == $this->moduleName and $methodName == $this->methodName)
|
||||
{
|
||||
$this->parse($moduleName, $methodName);
|
||||
return $this->output;
|
||||
@@ -810,7 +810,7 @@ class baseControl
|
||||
|
||||
/**
|
||||
* 加载控制器文件。
|
||||
* Load the control file.
|
||||
* Load the control file.
|
||||
*/
|
||||
if(!is_file($file2Included)) $this->app->triggerError("The control file $file2Included not found", __FILE__, __LINE__, $exit = true);
|
||||
if(!class_exists($classNameToFetch))
|
||||
@@ -821,26 +821,26 @@ class baseControl
|
||||
|
||||
/**
|
||||
* 设置调用的类名。
|
||||
* Set the name of the class to be called.
|
||||
* Set the name of the class to be called.
|
||||
*/
|
||||
$className = class_exists("my$moduleName") ? "my$moduleName" : $moduleName;
|
||||
if(!class_exists($className)) $this->app->triggerError(" The class $className not found", __FILE__, __LINE__, $exit = true);
|
||||
|
||||
/**
|
||||
* 解析参数,创建模块control对象。
|
||||
* Parse the params, create the $module control object.
|
||||
* Parse the params, create the $module control object.
|
||||
*/
|
||||
$module = new $className($moduleName, $methodName, $appName);
|
||||
|
||||
/**
|
||||
* 调用对应方法,使用ob方法获取输出内容。
|
||||
* Call the method and use ob function to get the output.
|
||||
* Call the method and use ob function to get the output.
|
||||
*/
|
||||
ob_start();
|
||||
call_user_func_array(array($module, $methodName), $params);
|
||||
$output = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
|
||||
unset($module);
|
||||
|
||||
/**
|
||||
@@ -855,14 +855,14 @@ class baseControl
|
||||
|
||||
/**
|
||||
* 返回内容。
|
||||
* Return the content.
|
||||
* Return the content.
|
||||
*/
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* 向浏览器输出内容。
|
||||
* Print the content of the view.
|
||||
* Print the content of the view.
|
||||
*
|
||||
* @param string $moduleName module name
|
||||
* @param string $methodName method name
|
||||
@@ -875,12 +875,12 @@ class baseControl
|
||||
echo $this->output;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 直接输出data数据,通常用于ajax请求中。
|
||||
* Send data directly, for ajax requests.
|
||||
*
|
||||
* @param misc $data
|
||||
* @param string $type
|
||||
* @param misc $data
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -897,7 +897,7 @@ class baseControl
|
||||
|
||||
/**
|
||||
* 响应非ajax的请求。
|
||||
* Response request not ajax.
|
||||
* Response request not ajax.
|
||||
*/
|
||||
if(isset($data['result']) and $data['result'] == 'success')
|
||||
{
|
||||
@@ -930,16 +930,16 @@ class baseControl
|
||||
* @access public
|
||||
* @return string the link string.
|
||||
*/
|
||||
public function createLink($moduleName, $methodName = 'index', $vars = array(), $viewType = '', $onlybody = false, $PRJID = 0)
|
||||
public function createLink($moduleName, $methodName = 'index', $vars = array(), $viewType = '', $onlybody = false)
|
||||
{
|
||||
if(empty($moduleName)) $moduleName = $this->moduleName;
|
||||
return helper::createLink($moduleName, $methodName, $vars, $viewType, $onlybody, $PRJID);
|
||||
return helper::createLink($moduleName, $methodName, $vars, $viewType, $onlybody);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建当前模块的一个方法链接。
|
||||
* Create a link to the inner method of current module.
|
||||
*
|
||||
*
|
||||
* @param string $methodName method name
|
||||
* @param string|array $vars the params passed, can be array(key=>value) or key1=value1&key2=value2
|
||||
* @param string $viewType the view type
|
||||
@@ -954,7 +954,7 @@ class baseControl
|
||||
/**
|
||||
* 重定向到另一个页面。
|
||||
* Location to another page.
|
||||
*
|
||||
*
|
||||
* @param string $url the target url.
|
||||
* @access public
|
||||
* @return void
|
||||
|
||||
@@ -1687,7 +1687,8 @@ class block extends control
|
||||
$stmt = $this->dao->select('*')->from(TABLE_TODO)
|
||||
->where("(assignedTo = '{$this->app->user->account}' or (account='{$this->app->user->account}'))")
|
||||
->andWhere('cycle')->eq(0)
|
||||
->orderBy('`date`');
|
||||
->andWhere('status')->eq('wait')
|
||||
->orderBy('`date` desc');
|
||||
if(isset($params->todoNum)) $stmt->limit($params->todoNum);
|
||||
$todos = $stmt->fetchAll();
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ html[lang='en'] #deadlineTd .input-group-addon {padding: 5px 18px;}
|
||||
.bootbox-prompt .modal-dialog {width: 500px; margin-top: 10%;}
|
||||
|
||||
#buildBoxActions {padding-left: 15px;}
|
||||
#executionIdBox {display: block;}
|
||||
|
||||
#module + .chosen-container-single .chosen-single,
|
||||
#task + .chosen-container-single .chosen-single,
|
||||
|
||||
@@ -272,6 +272,7 @@ function loadProductExecutions(productID, projectID = 0)
|
||||
$('#executionIdBox').load(link, function()
|
||||
{
|
||||
$(this).find('select').chosen();
|
||||
if(typeof(bugExecution) == 'string') $('#executionIdBox').prepend("<span class='input-group-addon' style='border-left-width: 0px;'>" + bugExecution + "</span>");
|
||||
if(required) $(this).addClass('required');
|
||||
});
|
||||
}
|
||||
@@ -546,7 +547,9 @@ function notice()
|
||||
else
|
||||
{
|
||||
executionID = $('#execution').val();
|
||||
html += '<a href="' + createLink('build', 'create','executionID=' + executionID) + '" target="_blank" style="padding-right:5px">' + createBuild + '</a> ';
|
||||
link = createLink('build', 'create','executionID=' + executionID + '&productID=' + $('#product').val());
|
||||
link += config.requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes';
|
||||
html += '<a href="' + link + '" data-toggle="modal" data-type="iframe" style="padding-right:5px">' + createBuild + '</a> ';
|
||||
html += '<a href="javascript:loadExecutionBuilds(' + executionID + ')">' + refresh + '</a>';
|
||||
}
|
||||
var $bba = $('#buildBoxActions');
|
||||
|
||||
@@ -72,7 +72,7 @@ js::set('oldProjectID', $projectID);
|
||||
</tr>
|
||||
<?php $showExecution = (strpos(",$showFields,", ',execution,') !== false);?>
|
||||
<tr>
|
||||
<th><?php echo ($showExecution) ? $lang->bug->execution : $lang->bug->type;?></th>
|
||||
<th><?php echo ($showExecution) ? $lang->bug->project : $lang->bug->type;?></th>
|
||||
|
||||
<?php if(!$showExecution):?>
|
||||
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
|
||||
@@ -97,8 +97,11 @@ js::set('oldProjectID', $projectID);
|
||||
<div class='table-col' id='projectBox'>
|
||||
<?php echo html::select('project', $projects, $projectID, "class='form-control chosen' onchange='loadProductExecutions({$productID}, this.value)'");?>
|
||||
</div>
|
||||
<div class='table-col' id='executionIdBox'>
|
||||
<?php echo html::select('execution', $executions, $executionID, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?>
|
||||
<div class='table-col'>
|
||||
<div class='input-group' id='executionIdBox'>
|
||||
<span class='input-group-addon fix-border'><?php echo $lang->bug->execution;?></span>
|
||||
<?php echo html::select('execution', $executions, $executionID, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
@@ -322,6 +325,7 @@ js::set('oldProjectID', $projectID);
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('bugModule', $lang->bug->module);?>
|
||||
<?php js::set('bugExecution', $lang->bug->execution);?>
|
||||
<script>
|
||||
$(function(){parent.$('body.hide-modal-close').removeClass('hide-modal-close');})
|
||||
</script>
|
||||
|
||||
@@ -49,6 +49,11 @@ class build extends control
|
||||
$this->session->set('buildCreate', $this->app->getURI(true));
|
||||
$execution = $this->execution->getByID($executionID);
|
||||
|
||||
/* Set menu. */
|
||||
$executions = $this->execution->getPairs($execution->project);
|
||||
$this->execution->setMenu($executions, $executionID);
|
||||
commonModel::setAppObjectID('execution', $executionID);
|
||||
|
||||
$productGroups = $this->execution->getProducts($executionID);
|
||||
$productID = $productID ? $productID : key($productGroups);
|
||||
$products = array();
|
||||
|
||||
@@ -312,12 +312,13 @@ $lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assignt
|
||||
$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
|
||||
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
|
||||
f($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
|
||||
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->doc = 'Doc|my|contribute|mode=doc&type=openedbyme';
|
||||
|
||||
$lang->my->dividerMenu = ',myWork,score,';
|
||||
|
||||
|
||||
@@ -313,12 +313,13 @@ $lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assignt
|
||||
$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
|
||||
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
|
||||
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
|
||||
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->doc = 'Doc|my|contribute|mode=doc&type=openedbyme';
|
||||
|
||||
$lang->my->dividerMenu = ',myWork,score,';
|
||||
|
||||
@@ -622,10 +623,11 @@ $lang->navGroup->measrecord = 'project';
|
||||
$lang->navGroup->execution = 'execution';
|
||||
$lang->navGroup->task = 'execution';
|
||||
$lang->navGroup->build = 'execution';
|
||||
$lang->navGroup->repo = 'execution';
|
||||
|
||||
$lang->navGroup->doc = 'doc';
|
||||
|
||||
$lang->navGroup->qa = 'qa';
|
||||
|
||||
$lang->navGroup->sqlbuilder = 'system';
|
||||
$lang->navGroup->auditcl = 'system';
|
||||
$lang->navGroup->cmcl = 'system';
|
||||
@@ -857,7 +859,7 @@ $lang->menu = new stdclass();
|
||||
$lang->menu->scrum = new stdclass();
|
||||
$lang->menu->scrum->index = 'Index|project|index|project={PROJECT}';
|
||||
$lang->menu->scrum->project = "$lang->executionCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story', 'subModule' => 'story', 'alias' => 'story,track');
|
||||
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project={PROJECT}', 'subModule' => 'story', 'alias' => 'story,track');
|
||||
$lang->menu->scrum->doc = 'Doc|doc|index|';
|
||||
$lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->ci = 'Code|repo|browse';
|
||||
@@ -882,7 +884,7 @@ $lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|brows
|
||||
$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|executionID={EXECUTION}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|project={PROJECT}');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|project={PROJECT}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story');
|
||||
$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project={PROJECT}');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Repo|repo|browse|';
|
||||
$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
|
||||
|
||||
@@ -312,12 +312,13 @@ $lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assignt
|
||||
$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
|
||||
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
|
||||
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
|
||||
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->doc = 'Doc|my|contribute|mode=doc&type=openedbyme';
|
||||
|
||||
$lang->my->dividerMenu = ',myWork,score,';
|
||||
|
||||
|
||||
@@ -312,12 +312,13 @@ $lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assignt
|
||||
$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
|
||||
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
|
||||
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
|
||||
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->doc = 'Doc|my|contribute|mode=doc&type=openedbyme';
|
||||
|
||||
$lang->my->dividerMenu = ',myProject,team,';
|
||||
|
||||
|
||||
@@ -313,12 +313,13 @@ $lang->my->workMenu->testcase = '用例|my|work|mode=testcase&type=assigntome
|
||||
$lang->my->workMenu->testtask = '测试单|my|work|mode=testtask&type=wait';
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->task = '任务|my|contribute|mode=task';
|
||||
$lang->my->contributeMenu->task = '任务|my|contribute|mode=task';
|
||||
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
|
||||
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = '用例|my|contribute|mode=testcase&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = '测试单|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = '用例|my|contribute|mode=testcase&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = '测试单|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->doc = '文档|my|contribute|mode=doc&type=openedbyme';
|
||||
|
||||
$lang->my->dividerMenu = ',myWork,score,';
|
||||
|
||||
@@ -335,7 +336,7 @@ $lang->story->menu = $lang->product->menu;
|
||||
$lang->execution = new stdclass();
|
||||
$lang->execution->homeMenu = new stdclass();
|
||||
$lang->execution->homeMenu->index = '仪表盘|execution|index|';
|
||||
$lang->execution->homeMenu->list = array('link' => '执行|execution|all|', 'alias' => 'batchedit');
|
||||
$lang->execution->homeMenu->list = array('link' => '执行|execution|all|', 'alias' => 'create,batchedit');
|
||||
|
||||
$lang->execution->menu = new stdclass();
|
||||
$lang->execution->menu->task = array('link' => '任务|execution|task|executionID=%s', 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
|
||||
@@ -345,7 +346,7 @@ $lang->execution->menu->view = array('link' => '视图|execution|grouptask|e
|
||||
$lang->execution->menu->story = array('link' => "{$lang->SRCommon}|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'linkstory,storykanban');
|
||||
$lang->execution->menu->qa = array('link' => '测试|execution|qa|executionID=%s', 'subModule' => 'bug', 'alias' => 'qa,bug,testcase,testtask,testreport');
|
||||
$lang->execution->menu->repo = array('link' => '代码|repo|browse|projectID=%s');
|
||||
$lang->execution->menu->doc = array('link' => '文档|doc|objectLibs|type=execution&objectID=%s&from=execution', 'subModule' => 'doc');
|
||||
$lang->execution->menu->doc = array('link' => '文档|doc|objectLibs|type=execution&objectID=%s', 'subModule' => 'doc');
|
||||
$lang->execution->menu->build = array('link' => '版本|execution|build|executionID=%s', 'subModule' => 'build');
|
||||
$lang->execution->menu->release = array('link' => '发布|projectrelease|browse|project=%s');
|
||||
$lang->execution->menu->action = array('link' => '动态|execution|dynamic|executionID=%s');
|
||||
@@ -624,15 +625,15 @@ $lang->navGroup->jenkins = 'project';
|
||||
$lang->navGroup->compile = 'project';
|
||||
$lang->navGroup->report = 'project';
|
||||
$lang->navGroup->measrecord = 'project';
|
||||
$lang->navGroup->qa = 'project';
|
||||
|
||||
$lang->navGroup->execution = 'execution';
|
||||
$lang->navGroup->task = 'execution';
|
||||
$lang->navGroup->build = 'execution';
|
||||
$lang->navGroup->repo = 'execution';
|
||||
|
||||
$lang->navGroup->doc = 'doc';
|
||||
|
||||
$lang->navGroup->qa = 'qa';
|
||||
|
||||
$lang->navGroup->company = 'system';
|
||||
$lang->navGroup->sqlbuilder = 'system';
|
||||
$lang->navGroup->auditcl = 'system';
|
||||
@@ -863,8 +864,8 @@ $lang->icons['score'] = 'tint';
|
||||
$lang->menu = new stdclass();
|
||||
$lang->menu->scrum = new stdclass();
|
||||
$lang->menu->scrum->index = '仪表盘|project|index|project={PROJECT}';
|
||||
$lang->menu->scrum->execution = "$lang->executionCommon|execution|all|status=all&projectID={PROJECT}&from=project";
|
||||
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story', 'alias' => 'story,track');
|
||||
$lang->menu->scrum->execution = "$lang->executionCommon|execution|all|status=all&projectID={PROJECT}";
|
||||
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|projectID={PROJECT}', 'alias' => 'story,track');
|
||||
$lang->menu->scrum->doc = array('link' => '文档|doc|objectLibs|type=project&objectID={PROJECT}', 'subModule' => 'doc');
|
||||
$lang->menu->scrum->qa = array('link' => '测试|qa|index', 'subModule' => 'testcase,testtask');
|
||||
$lang->menu->scrum->ci = '代码|repo|browse';
|
||||
@@ -901,7 +902,7 @@ $lang->menu->waterfall->programplan = array('link' => '计划|programplan|bro
|
||||
$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|executionID={EXECUTION}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->doc = array('link' => '文档|doc|index|project={PROJECT}');
|
||||
$lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|project={PROJECT}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story');
|
||||
$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project={PROJECT}');
|
||||
$lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = '代码|repo|browse|';
|
||||
$lang->menu->waterfall->track = array('link' => '矩阵|projectstory|track', 'alias' => 'track');
|
||||
@@ -947,6 +948,6 @@ $lang->projectstory->menu = new stdclass();
|
||||
$lang->stakeholder->menu = $lang->scrum->setMenu;
|
||||
|
||||
$lang->nc->menu = $lang->auditplan->menu;
|
||||
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry');
|
||||
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'qa', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry');
|
||||
|
||||
include (dirname(__FILE__) . '/menuOrder.php');
|
||||
|
||||
+13
-20
@@ -2289,10 +2289,12 @@ EOD;
|
||||
{
|
||||
global $lang, $config;
|
||||
|
||||
/* If homeMenu is not exists or unset, display menu. */
|
||||
if(!isset($lang->$openApp->homeMenu))
|
||||
{
|
||||
$lang->menu = $lang->$openApp->menu;
|
||||
$lang->menu = $openApp == 'project' ? self::getProjectMainMenu($moduleName) : $lang->$openApp->menu;
|
||||
$lang->menuOrder = $lang->$openApp->menuOrder;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2302,6 +2304,7 @@ EOD;
|
||||
return;
|
||||
}
|
||||
|
||||
/* If the method is in homeMenu, display homeMenu. */
|
||||
foreach($lang->$openApp->homeMenu as $menu)
|
||||
{
|
||||
$link = is_array($menu) ? $menu['link'] : $menu;
|
||||
@@ -2314,22 +2317,9 @@ EOD;
|
||||
}
|
||||
}
|
||||
|
||||
if($openApp == 'project')
|
||||
{
|
||||
if($config->systemMode == 'classic' or ($moduleName == 'project' and $methodName == 'browse'))
|
||||
{
|
||||
$lang->menu = $lang->project->homeMenu;
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang->menu = self::getProjectMainMenu($moduleName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang->menu = $lang->$openApp->menu;
|
||||
$lang->menuOrder = $lang->$openApp->menuOrder;
|
||||
}
|
||||
/* Default, display menu. */
|
||||
$lang->menu = $openApp == 'project' ? self::getProjectMainMenu($moduleName) : $lang->$openApp->menu;
|
||||
$lang->menuOrder = $lang->$openApp->menuOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2384,7 +2374,7 @@ EOD;
|
||||
self::initProjectSubmenu();
|
||||
if($project->model == 'scrum')
|
||||
{
|
||||
$lang->menuOrder = $lang->scrum->menuOrder;
|
||||
$lang->project->menuOrder = $lang->scrum->menuOrder;
|
||||
|
||||
/* The scrum project temporarily hides the trace matrix. */
|
||||
unset($lang->projectstory->menu->track);
|
||||
@@ -2395,7 +2385,7 @@ EOD;
|
||||
{
|
||||
$lang->project->dividerMenu = str_replace(',project,', ',', $lang->project->dividerMenu);
|
||||
$lang->release->menu = new stdclass();
|
||||
$lang->menuOrder = $lang->waterfall->menuOrder;
|
||||
$lang->project->menuOrder = $lang->waterfall->menuOrder;
|
||||
return self::processMenuVars($lang->menu->waterfall);
|
||||
}
|
||||
}
|
||||
@@ -2479,7 +2469,10 @@ EOD;
|
||||
|
||||
foreach($lang->$openApp->menu as $label => $menu)
|
||||
{
|
||||
$lang->$openApp->menu->{$label}['link'] = is_array($menu) ? sprintf($menu['link'], $objectID) : sprintf($menu, $objectID);
|
||||
if(isset($lang->$openApp->menu->{$label}['link']))
|
||||
{
|
||||
$lang->$openApp->menu->{$label}['link'] = is_array($menu) ? sprintf($menu['link'], $objectID) : sprintf($menu, $objectID);
|
||||
}
|
||||
}
|
||||
|
||||
if($openApp == 'program')
|
||||
|
||||
@@ -29,7 +29,7 @@ $isQa = $app->openApp == 'qa';
|
||||
<?php if($isProject) echo isset($lang->project->switcherMenu) ? $lang->project->switcherMenu : '';;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<nav id='navbar'><?php commonModel::printMainmenu($app->rawModule, $app->rawMethod);?></nav>
|
||||
<nav id='navbar'><?php commonModel::printMainMenu($app->rawModule, $app->rawMethod);?></nav>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!in_array($app->rawModule, $lang->noMenuModule)):?>
|
||||
|
||||
@@ -567,10 +567,10 @@ class doc extends control
|
||||
|
||||
/**
|
||||
* Delete file for doc.
|
||||
*
|
||||
* @param int $docID
|
||||
* @param int $fileID
|
||||
* @param string $confirm
|
||||
*
|
||||
* @param int $docID
|
||||
* @param int $fileID
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -728,7 +728,7 @@ class doc extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get all child module.
|
||||
* Ajax get all child module.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -919,7 +919,7 @@ class doc extends control
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
}
|
||||
elseif($from == 'project')
|
||||
elseif($from == 'project' or $from == 'execution')
|
||||
{
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
}
|
||||
@@ -947,7 +947,7 @@ class doc extends control
|
||||
|
||||
$this->view->type = $type;
|
||||
$this->view->object = $object;
|
||||
$this->view->from = $$from;
|
||||
$this->view->from = $from;
|
||||
$this->view->libs = $this->doc->getLibsByObject($type, $objectID);
|
||||
$this->view->canBeChanged = common::canModify($type, $object); // Determines whether an object is editable.
|
||||
$this->display();
|
||||
|
||||
@@ -54,6 +54,7 @@ $lang->doc->searchDoc = '搜索';
|
||||
$lang->doc->fast = '快速访问';
|
||||
$lang->doc->allDoc = '所有文档';
|
||||
$lang->doc->openedByMe = '由我创建';
|
||||
$lang->doc->editedByMe = '由我编辑';
|
||||
$lang->doc->orderByOpen = '最近添加';
|
||||
$lang->doc->orderByEdit = '最近更新';
|
||||
$lang->doc->orderByVisit = '最近访问';
|
||||
|
||||
+17
-2
@@ -356,6 +356,22 @@ class docModel extends model
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
}
|
||||
elseif($browseType == 'editedbyme')
|
||||
{
|
||||
$docIDList = $this->dao->select('objectID')->from(TABLE_ACTION)
|
||||
->where('objectType')->eq('doc')
|
||||
->andWhere('actor')->eq($this->app->user->account)
|
||||
->fetchAll('objectID');
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('id')->in(array_keys($docIDList))
|
||||
->beginIF($libID)->andWhere('lib')->in($libID)->fi()
|
||||
->andWhere('lib')->in($allLibs)
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
->orderBy($sort)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
}
|
||||
elseif($browseType == 'byediteddate')
|
||||
{
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
@@ -1824,13 +1840,12 @@ class docModel extends model
|
||||
public function appendNavCSS()
|
||||
{
|
||||
$navCSS = '';
|
||||
if($this->lang->navGroup->doc == 'doc')
|
||||
if($this->app->openApp == 'doc')
|
||||
{
|
||||
$navCSS .= <<<EOF
|
||||
#subHeader {margin-top: -50px; background: rgba(0,0,0,0);}
|
||||
#pageActions .btn-link {color: #fff; font-size: 14px; line-height: 18px; border: #84a2e2 1px solid;}
|
||||
.header-btn {padding: 0;}
|
||||
.header-btn .btn{padding: 6px 12px;}
|
||||
EOF;
|
||||
if($this->app->rawMethod != 'index') $navCSS .= '.header-btn+.header-btn::after, .header-btn+.header-btn::before {top: -50px;}';
|
||||
}
|
||||
|
||||
@@ -1169,6 +1169,7 @@ class execution extends control
|
||||
/**
|
||||
* Create a execution.
|
||||
*
|
||||
* @param string $projectID
|
||||
* @param string $productID
|
||||
* @param string $executionID
|
||||
* @param string $copyExecutionID
|
||||
@@ -1178,7 +1179,7 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($productID = '', $executionID = '', $copyExecutionID = '', $planID = 0, $confirm = 'no')
|
||||
public function create($productID = '', $executionID = '', $copyExecutionID = '', $planID = 0, $confirm = 'no', $projectID = 0)
|
||||
{
|
||||
$this->app->loadLang('program');
|
||||
$this->app->loadLang('stage');
|
||||
@@ -1220,6 +1221,7 @@ class execution extends control
|
||||
$team = $copyExecution->team;
|
||||
$acl = $copyExecution->acl;
|
||||
$whitelist = $copyExecution->whitelist;
|
||||
$projectID = $copyExecution->project;
|
||||
$products = $this->execution->getProducts($copyExecutionID);
|
||||
foreach($products as $product)
|
||||
{
|
||||
@@ -1268,19 +1270,6 @@ class execution extends control
|
||||
}
|
||||
}
|
||||
|
||||
$isSprint = true;
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$project = $this->project->getById($this->session->PRJ);
|
||||
if($project->model == 'scrum')
|
||||
{
|
||||
unset($this->lang->execution->endList[62]);
|
||||
unset($this->lang->execution->endList[93]);
|
||||
unset($this->lang->execution->endList[186]);
|
||||
unset($this->lang->execution->endList[365]);
|
||||
}
|
||||
}
|
||||
|
||||
$executionID = key($this->executions);
|
||||
$this->execution->setMenu($this->executions, $executionID);
|
||||
|
||||
@@ -1288,15 +1277,16 @@ class execution extends control
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->executions = array('' => '') + $this->execution->getList();
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->allProducts = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$this->view->allProducts = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
$this->view->acl = $acl;
|
||||
$this->view->plan = $plan;
|
||||
$this->view->name = $name;
|
||||
$this->view->code = $code;
|
||||
$this->view->team = $team;
|
||||
$this->view->allProjects = array('' => '') + $this->project->getPairsByModel();
|
||||
$this->view->allProjects = array(0 => '') + $this->project->getPairsByModel();
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->products = $products;
|
||||
$this->view->productPlan = array(0 => '') + $productPlan;
|
||||
$this->view->productPlans = array(0 => '') + $productPlans;
|
||||
@@ -1304,7 +1294,6 @@ 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->isSprint = $isSprint;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ $(function()
|
||||
|
||||
var adjustMainCol = function()
|
||||
{
|
||||
if(isSprint) $('.main-form .col-main').css('width', Math.max(250, Math.floor(($('#productsBox').outerWidth() - 50)/3) + 10));
|
||||
$('.main-form .col-main').css('width', Math.max(250, Math.floor(($('#productsBox').outerWidth() - 50)/3) + 10));
|
||||
};
|
||||
adjustMainCol();
|
||||
$(window).on('resize', adjustMainCol);
|
||||
@@ -57,3 +57,14 @@ function showLifeTimeTips()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh page.
|
||||
*
|
||||
* @param object $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function refreshPage(projectID)
|
||||
{
|
||||
location.href = createLink('execution', 'create', 'productID=&executionID=©ExecutionID=&planID=&confirm=no&projectID=' + projectID);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
<?php js::set('holders', $lang->execution->placeholder);?>
|
||||
<?php js::set('errorSameProducts', $lang->execution->errorSameProducts);?>
|
||||
<?php js::set('productID', empty($productID) ? 0 : $productID);?>
|
||||
<?php js::set('isSprint', $isSprint);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
@@ -48,7 +47,7 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->execution->project;?></th>
|
||||
<td class="col-main"><?php echo html::select("project", $allProjects, '', "class='form-control chosen' required onchange='loadBranches(this)'");?></td>
|
||||
<td class="col-main"><?php echo html::select("project", $allProjects, $projectID, "class='form-control chosen' required onchange='refreshPage(this.value)'");?></td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -86,31 +85,9 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->type;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if($isSprint)
|
||||
{
|
||||
echo html::select('lifetime', $lang->execution->lifeTimeList, '', "class='form-control' onchange='showLifeTimeTips()'");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::select('attribute', $lang->stage->typeList, '', "class='form-control'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo html::select('lifetime', $lang->execution->lifeTimeList, '', "class='form-control' onchange='showLifeTimeTips()'"); ?></td>
|
||||
<td class='muted' colspan='2'><div id='lifeTimeTips'><?php echo $lang->execution->typeDesc;?></div></td>
|
||||
</tr>
|
||||
<?php if(!$isSprint):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->programplan->percent;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('percent', '', "class='form-control'");?>
|
||||
<span class='input-group-addon'>%</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->execution->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'wait');?></td>
|
||||
@@ -183,7 +160,6 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='4' class='text-center form-actions'>
|
||||
<?php if($isSprint) echo html::hidden('lifetime', 'short');?>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton();?>
|
||||
</td>
|
||||
|
||||
@@ -476,6 +476,37 @@ class my extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function doc($type = 'openedbyme', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* Save session, load lang. */
|
||||
if($this->app->viewType != 'json') $this->session->set('docList', $this->app->getURI(true));
|
||||
$this->loadModel('doc');
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Append id for secend sort. */
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
|
||||
$docs = $this->doc->getDocsByBrowseType(0, $type, 0, 0, $sort, $pager);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->doc;
|
||||
$this->view->position[] = $this->lang->my->doc;
|
||||
$this->view->docs = $docs;
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->type = $type;
|
||||
$this->view->recTotal = $recTotal;
|
||||
$this->view->recPerPage = $recPerPage;
|
||||
$this->view->pageID = $pageID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
|
||||
$this->display();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* My projects.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
$('.ajaxCollect').click(function (event) {
|
||||
var obj = $(this);
|
||||
var url = obj.data('url');
|
||||
$.get(url, function(response)
|
||||
{
|
||||
if(response.status == 'yes')
|
||||
{
|
||||
obj.children('i').removeClass().addClass('icon icon-star text-yellow');
|
||||
obj.parent().prev().children('.file-name').children('i').remove('.icon');
|
||||
obj.parent().prev().children('.file-name').prepend('<i class="icon icon-star text-yellow"></i> ');
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.children('i').removeClass().addClass('icon icon-star-empty');
|
||||
obj.parent().prev().children('.file-name').children('i').remove(".icon");
|
||||
}
|
||||
}, 'json');
|
||||
return false;
|
||||
});
|
||||
@@ -14,6 +14,7 @@ $lang->my->bug = 'My Bugs';
|
||||
$lang->my->testTask = 'My Builds';
|
||||
$lang->my->testCase = 'My Cases';
|
||||
$lang->my->story = 'My Stories';
|
||||
$lang->my->doc = "My Docs";
|
||||
$lang->my->createProgram = 'Create Program';
|
||||
$lang->my->project = "My Projects";
|
||||
$lang->my->execution = "My {$lang->executionCommon}s";
|
||||
|
||||
@@ -14,6 +14,7 @@ $lang->my->bug = 'My Bugs';
|
||||
$lang->my->testTask = 'My Builds';
|
||||
$lang->my->testCase = 'My Cases';
|
||||
$lang->my->story = 'My Stories';
|
||||
$lang->my->doc = "My Docs";
|
||||
$lang->my->createProgram = 'Create Program';
|
||||
$lang->my->project = "My Projects";
|
||||
$lang->my->execution = "My {$lang->executionCommon}s";
|
||||
|
||||
@@ -14,6 +14,7 @@ $lang->my->bug = 'My Bugs';
|
||||
$lang->my->testTask = 'My Builds';
|
||||
$lang->my->testCase = 'My Cases';
|
||||
$lang->my->story = 'My Stories';
|
||||
$lang->my->doc = "My Docs";
|
||||
$lang->my->createProgram = 'Create Program';
|
||||
$lang->my->project = "My Projects";
|
||||
$lang->my->execution = "My {$lang->executionCommon}s";
|
||||
|
||||
@@ -14,6 +14,7 @@ $lang->my->bug = 'My Bugs';
|
||||
$lang->my->testTask = 'My Builds';
|
||||
$lang->my->testCase = 'My Cases';
|
||||
$lang->my->story = 'My Stories';
|
||||
$lang->my->doc = "My Docs";
|
||||
$lang->my->createProgram = 'Create Program';
|
||||
$lang->my->project = "My Projects";
|
||||
$lang->my->execution = "My {$lang->executionCommon}s";
|
||||
|
||||
@@ -14,6 +14,7 @@ $lang->my->bug = '我的Bug';
|
||||
$lang->my->testTask = '我的版本';
|
||||
$lang->my->testCase = '我的用例';
|
||||
$lang->my->story = "我的{$lang->SRCommon}";
|
||||
$lang->my->doc = "我的文档";
|
||||
$lang->my->createProgram = '添加项目';
|
||||
$lang->my->project = "我的项目";
|
||||
$lang->my->execution = "我的{$lang->executionCommon}";
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* The project view file of my module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package my
|
||||
* @version $Id
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('mode', 'doc');?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
|
||||
echo html::a(inlink($app->rawMethod, "mode=doc&type=openedbyme"), "<span class='text'>{$lang->doc->openedByMe}</span>" . ($type == 'openedbyme' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedbyme' ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink($app->rawMethod, "mode=doc&type=editedbyme"), "<span class='text'>{$lang->doc->editedByMe}</span>" . ($type == 'editedbyme' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'editedbyme' ? ' btn-active-text' : '') . "'");
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class='main-table'>
|
||||
<?php if(empty($docs)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->project->empty;?></span>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<form class='main-table' id='projectForm' method='post' data-ride='table' data-nested='true' data-checkable='false'>
|
||||
<table class='table table-fixed' id='docList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="c-name"><?php echo $lang->doc->title;?></th>
|
||||
<th class="c-num"><?php echo $lang->doc->size;?></th>
|
||||
<th class="c-user"><?php echo $lang->doc->addedBy;?></th>
|
||||
<th class="c-datetime"><?php echo $lang->doc->addedDate;?></th>
|
||||
<th class="c-datetime"><?php echo $lang->doc->editedDate;?></th>
|
||||
<th class="w-90px text-center"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='docTableList'>
|
||||
<?php foreach($docs as $doc):?>
|
||||
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
|
||||
<?php $collectTitle = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
|
||||
<tr>
|
||||
<td class="c-name"><?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id&version=0&from={$lang->navGroup->doc}"), "<i class='icon icon-file-text text-muted'></i> " . $doc->title, '', "title={$doc->title}");?></td>
|
||||
<td class="c-num"><?php echo $doc->fileSize ? $doc->fileSize : '-';?></td>
|
||||
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
|
||||
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'y-m-d');?></td>
|
||||
<td class="c-datetime"><?php echo formatTime($doc->editedDate, 'y-m-d');?></td>
|
||||
<td class="c-actions">
|
||||
<?php if(common::canBeChanged('doc', $doc)):?>
|
||||
<?php if(common::hasPriv('doc', 'collect')):?>
|
||||
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
|
||||
<?php endif;?>
|
||||
<?php common::printLink('doc', 'edit', "docID=$doc->id&comment=false&from={$lang->navGroup->doc}", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link'")?>
|
||||
<?php common::printLink('doc', 'delete', "docID=$doc->id&confirm=no&from={$lang->navGroup->doc}", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -343,6 +343,7 @@ class product extends control
|
||||
$this->view->title = $this->lang->product->create;
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->programID = $programID;
|
||||
$this->view->poUsers = $poUsers;
|
||||
$this->view->qdUsers = $qdUsers;
|
||||
$this->view->rdUsers = $rdUsers;
|
||||
|
||||
@@ -14,6 +14,18 @@ function loadProductLines(rootID)
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set parent program.
|
||||
*
|
||||
* @param $parentProgram
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setParentProgram(parentProgram)
|
||||
{
|
||||
location.href = createLink('product', 'create', 'programID=' + parentProgram);
|
||||
}
|
||||
|
||||
$('#program').change(function()
|
||||
{
|
||||
var programID = $(this).val();
|
||||
|
||||
@@ -32,7 +32,7 @@ class productModel extends model
|
||||
$product = $this->getByID($productID);
|
||||
if($product)
|
||||
{
|
||||
$this->lang->modulePageNav = $this->getModuleNav($products, '', $product, $extra, $branch, $module, $moduleType);
|
||||
$this->getModuleNav($products, '', $product, $extra, $branch, $module, $moduleType);
|
||||
}
|
||||
|
||||
foreach($this->lang->product->menu as $key => $menu)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<?php if($this->config->systemMode == 'new'):?>
|
||||
<tr>
|
||||
<th class='w-140px'><?php echo $lang->program->common;?></th>
|
||||
<td><?php echo html::select('program', $programs, '', "class='form-control chosen' required");?></td><td></td>
|
||||
<td><?php echo html::select('program', $programs, $programID, "class='form-control chosen' required onchange='setParentProgram(this.value)'");?></td><td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<?php foreach($projectStats as $project):?>
|
||||
<tr>
|
||||
<td><?php printf('%03d', $project->id);?></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('project', 'task', 'project=' . $project->id, '', false, $project->id), $project->name, '_parent');?></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('project', explode('-', $config->projectLink)[1], 'project=' . $project->id, '', false, $project->id), $project->name, '_parent');?></td>
|
||||
<td><?php echo isset($project->programName) ? $project->programName : '';?></td>
|
||||
<td>
|
||||
<?php $userID = isset($PMList[$project->PM]) ? $PMList[$project->PM]->id : ''?>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
$(document).on('click', '.task-toggle', function(e)
|
||||
{
|
||||
{
|
||||
var $toggle = $(this);
|
||||
var id = $(this).data('id');
|
||||
var isCollapsed = $toggle.toggleClass('collapsed').hasClass('collapsed');
|
||||
@@ -24,7 +24,7 @@ $(function()
|
||||
{
|
||||
var PRJID = $('#project').val();
|
||||
var planID = $('#planID').val();
|
||||
parent.location.href = createLink('project', 'create', 'productID=' + productID + '&projectID=©ProjectID=&planID=' + planID, '', '', PRJID);
|
||||
parent.location.href = createLink('execution', 'create', 'productID=' + productID + '&executionID=©ExecutionID=&planID=' + planID + '&confirm=&projectID=' + PRJID, '', '');
|
||||
});
|
||||
});
|
||||
$(document).on('click', 'td.content .more', function(e)
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<td class='text-center'><?php echo $plan->stories;?></td>
|
||||
<td class='text-center'><?php echo $plan->bugs;?></td>
|
||||
<td class='text-center'><?php echo $plan->hour;?></td>
|
||||
<td class='text-center'><?php if(!empty($plan->projectID)) echo html::a(helper::createLink('project', 'task', 'projectID=' . $plan->projectID), '<i class="icon-search"></i>');?></td>
|
||||
<td class='text-center'><?php if(!empty($plan->projectID)) echo html::a(helper::createLink('execution', 'task', 'projectID=' . $plan->projectID), '<i class="icon-search"></i>');?></td>
|
||||
<td class='text-left content'>
|
||||
<?php $desc = trim(strip_tags(str_replace(array('</p>', '<br />', '<br>', '<br/>'), "\n", str_replace(array("\n", "\r"), '', $plan->desc)), '<img>'));?>
|
||||
<div title='<?php echo $desc;?>'><?php echo nl2br($desc);?></div>
|
||||
@@ -128,7 +128,7 @@
|
||||
<?php foreach($extendFields as $extendField) echo "<td>" . $this->loadModel('flow')->getFieldValue($extendField, $plan) . "</td>";?>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('project', 'create', $plan)) echo html::a('#projects', '<i class="icon-plus"></i>', '', "data-toggle='modal' data-id='$plan->id' onclick='getPlanID(this)' class='btn' title='{$lang->productplan->createExecution}'");
|
||||
if(common::hasPriv('execution', 'create', $plan)) echo html::a('#projects', '<i class="icon-plus"></i>', '', "data-toggle='modal' data-id='$plan->id' onclick='getPlanID(this)' class='btn' title='{$lang->productplan->createExecution}'");
|
||||
if(common::hasPriv('productplan', 'linkStory', $plan) and $plan->parent >= 0) echo html::a(inlink('view', "planID=$plan->id&type=story&orderBy=id_desc&link=true"), '<i class="icon-link"></i>', '', "class='btn' title='{$lang->productplan->linkStory}'");
|
||||
if(common::hasPriv('productplan', 'linkBug', $plan)) echo html::a(inlink('view', "planID=$plan->id&type=bug&orderBy=id_desc&link=true"), '<i class="icon-bug"></i>', '', "class='btn' title='{$lang->productplan->linkBug}'");
|
||||
common::printIcon('productplan', 'edit', "planID=$plan->id", $plan, 'list');
|
||||
|
||||
@@ -501,7 +501,6 @@ class project extends control
|
||||
public function view($projectID = 0)
|
||||
{
|
||||
$this->app->loadLang('bug');
|
||||
$this->lang->navGroup->project = 'project';
|
||||
$this->lang->project->menu = $this->lang->scrum->setMenu;
|
||||
$moduleIndex = array_search('project', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
@@ -546,7 +545,6 @@ class project extends control
|
||||
*/
|
||||
public function group($projectID = 0, $programID = 0)
|
||||
{
|
||||
$this->lang->navGroup->project = 'project';
|
||||
$this->lang->project->menu = $this->lang->scrum->setMenu;
|
||||
$moduleIndex = array_search('project', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
@@ -1214,7 +1212,6 @@ class project extends control
|
||||
{
|
||||
if($from == 'project')
|
||||
{
|
||||
$this->lang->navGroup->project = 'project';
|
||||
$this->lang->project->menu = $this->lang->scrum->setMenu;
|
||||
$moduleIndex = array_search('project', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
@@ -1378,9 +1375,6 @@ class project extends control
|
||||
*/
|
||||
public function adjustNavigation($from = '', $projectID = 0)
|
||||
{
|
||||
if($from == 'browse') $this->lang->project->menu = $this->lang->project->menu;
|
||||
if($from == 'program') $this->lang->navGroup->project = 'project';
|
||||
|
||||
if($from == 'project')
|
||||
{
|
||||
$this->lang->navGroup->project = 'project';
|
||||
|
||||
@@ -27,12 +27,12 @@ $(function()
|
||||
/**
|
||||
* Set parent program.
|
||||
*
|
||||
* @param $parentProgram
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setParentProgram()
|
||||
function setParentProgram(parentProgram)
|
||||
{
|
||||
var parentProgram = $("#parent").val();
|
||||
location.href = createLink('project', 'create', 'model=' + model + '&programID=' + parentProgram);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of projectBuild module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package projectBuild
|
||||
* @version $Id: control.php 5094 2013-07-10 08:46:15Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class projectBuild extends control
|
||||
{
|
||||
/**
|
||||
* Browse builds of a project.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $type all|product|bysearch
|
||||
* @param int $param
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($projectID = 0, $type = 'all', $param = 0)
|
||||
{
|
||||
$this->loadModel('project');
|
||||
$this->loadModel('execution');
|
||||
$this->loadModel('build');
|
||||
$project = $this->project->getByID($projectID);
|
||||
|
||||
/* Get products' list. */
|
||||
$products = $this->project->getProducts($projectID, false);
|
||||
$products = array('' => '') + $products;
|
||||
|
||||
/* Build the search form. */
|
||||
$type = strtolower($type);
|
||||
$queryID = ($type == 'bysearch') ? (int)$param : 0;
|
||||
$actionURL = $this->createLink('projectbuild', 'browse', "projectID=$projectID&type=bysearch&queryID=myQueryID");
|
||||
|
||||
$executions = $this->execution->getByProject($projectID, 'all', '', true);
|
||||
$this->config->build->search['fields']['project'] = $this->project->lang->executionCommon;
|
||||
$this->config->build->search['params']['project'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $executions);
|
||||
|
||||
$this->project->buildProjectBuildSearchForm($products, $queryID, $actionURL, 'project');
|
||||
commonModel::setAppObjectID('project', $projectID);
|
||||
|
||||
if($type == 'bysearch')
|
||||
{
|
||||
$builds = $this->build->getProjectBuildsBySearch((int)$projectID, (int)$param);
|
||||
}
|
||||
else
|
||||
{
|
||||
$builds = $this->build->getProjectBuilds((int)$projectID, $type, $param);
|
||||
}
|
||||
|
||||
/* Set project builds. */
|
||||
$projectBuilds = array();
|
||||
if(!empty($builds))
|
||||
{
|
||||
foreach($builds as $build) $projectBuilds[$build->product][] = $build;
|
||||
}
|
||||
|
||||
/* Header and position. */
|
||||
$this->view->title = $project->name . $this->lang->colon . $this->lang->execution->build;
|
||||
$this->view->position[] = html::a(inlink('browse', "projectID=$projectID"), $project->name);
|
||||
$this->view->position[] = $this->lang->execution->build;
|
||||
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->buildsTotal = count($builds);
|
||||
$this->view->projectBuilds = $projectBuilds;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->product = $type == 'product' ? $param : 'all';
|
||||
$this->view->project = $project;
|
||||
$this->view->products = $products;
|
||||
$this->view->executions = $executions;
|
||||
$this->view->type = $type;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
@@ -58,20 +58,23 @@ class projectrelease extends control
|
||||
/**
|
||||
* Browse releases.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($type = 'all')
|
||||
public function browse($projectID, $type = 'all')
|
||||
{
|
||||
$this->session->set('releaseList', $this->app->getURI(true));
|
||||
$execution = $this->loadModel('execution')->getById($this->session->PRJ);
|
||||
commonModel::setAppObjectID('project', $projectID);
|
||||
|
||||
$this->view->title = $execution->name . $this->lang->colon . $this->lang->release->browse;
|
||||
$this->view->position[] = $this->lang->release->browse;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->products = $this->loadModel('product')->getProducts($this->session->PRJ);
|
||||
$this->view->releases = $this->projectrelease->getList($this->session->PRJ, $type);
|
||||
$this->view->releases = $this->projectrelease->getList($projectID, $type);
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->type = $type;
|
||||
$this->display();
|
||||
}
|
||||
@@ -79,10 +82,11 @@ class projectrelease extends control
|
||||
/**
|
||||
* Create a release.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create()
|
||||
public function create($projectID)
|
||||
{
|
||||
$this->app->loadConfig('release');
|
||||
$this->config->projectrelease->create = $this->config->release->create;
|
||||
@@ -105,7 +109,9 @@ class projectrelease extends control
|
||||
foreach($releaseBuilds as $build) unset($builds[$build]);
|
||||
unset($builds['trunk']);
|
||||
|
||||
commonModel::setAppObjectID('project', $projectID);
|
||||
$this->commonAction();
|
||||
|
||||
$this->view->title = $this->view->project->name . $this->lang->colon . $this->lang->release->create;
|
||||
$this->view->position[] = $this->lang->release->create;
|
||||
$this->view->builds = $builds;
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
echo html::a(inlink('browse', "type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "projectID=$projectID&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "projectID=$projectID&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "projectID=$projectID&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
|
||||
?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::canModify('execution', $execution)):?>
|
||||
<?php common::printLink('projectrelease', 'create', '', "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
|
||||
<?php common::printLink('projectrelease', 'create', "projectID=$projectID", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class='main-col main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->repo->create; ?></h2>
|
||||
<h2><?php echo $lang->repo->createAction;?></h2>
|
||||
</div>
|
||||
<form id='repoForm' method='post' class='form-ajax'>
|
||||
<table class='table table-form'>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<td colspan="2" class='sourceTd'>
|
||||
<div class="input-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><?php echo $lang->story->source;?></div>
|
||||
<div class="input-group-addon" style="min-width: 77px;"><?php echo $lang->story->source;?></div>
|
||||
<?php echo html::select('source', $lang->story->sourceList, $source, "class='form-control chosen'");?>
|
||||
<span class='input-group-addon'><?php echo $lang->story->sourceNote;?></span>
|
||||
<?php echo html::input('sourceNote', $sourceNote, "class='form-control' style='width:140px;'");?>
|
||||
@@ -98,15 +98,23 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->reviewedBy;?></th>
|
||||
<td><?php echo html::select('assignedTo', $users, empty($needReview) ? $product->PO : '', "class='form-control chosen'");?></td>
|
||||
<?php if(!$this->story->checkForceReview()):?>
|
||||
<td>
|
||||
<div class='checkbox-primary'>
|
||||
<input id='needNotReview' name='needNotReview' value='1' type='checkbox' class='no-margin' <?php echo $needReview;?>/>
|
||||
<label for='needNotReview'><?php echo $lang->story->needNotReview;?></label>
|
||||
<td colspan="2">
|
||||
<div class="table-row">
|
||||
<div class="table-col">
|
||||
<?php echo html::select('assignedTo', $users, empty($needReview) ? $product->PO : '', "class='form-control chosen'");?>
|
||||
</div>
|
||||
<?php if(!$this->story->checkForceReview()):?>
|
||||
<div class="table-col w-130px">
|
||||
<span class="input-group-addon" style="border: 1px solid #dcdcdc; border-left-width: 0px;">
|
||||
<div class='checkbox-primary'>
|
||||
<input id='needNotReview' name='needNotReview' value='1' type='checkbox' class='no-margin' <?php echo $needReview;?>/>
|
||||
<label for='needNotReview'><?php echo $lang->story->needNotReview;?></label>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if($type == 'requirement'):?>
|
||||
<?php if(strpos(",$showFields,", ',source,') !== false):?>
|
||||
<td colspan="2" class='sourceTd'>
|
||||
@@ -125,7 +133,7 @@
|
||||
<?php if($type == 'story' and $this->config->URAndSR):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->requirement;?></th>
|
||||
<td colspan=2><?php echo html::select('URS[]', $URS, '', "class='form-control chosen' multiple");?></td>
|
||||
<td colspan="4"><?php echo html::select('URS[]', $URS, '', "class='form-control chosen' multiple");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
|
||||
@@ -462,7 +462,6 @@ class task extends control
|
||||
/* The tasks of my. */
|
||||
else
|
||||
{
|
||||
$this->lang->navGroup->task = 'my';
|
||||
$this->lang->task->menu = $this->lang->my->menu;
|
||||
$this->lang->task->menuOrder = $this->lang->my->menuOrder;
|
||||
$this->loadModel('my')->setMenu();
|
||||
|
||||
@@ -290,6 +290,7 @@ class testcase extends control
|
||||
|
||||
setcookie('caseModule', 0, 0, $this->config->webRoot, '', false, false);
|
||||
$response['locate'] = $this->createLink('testcase', 'browse', "productID={$this->post->product}&branch={$this->post->branch}&browseType=all¶m=0&orderBy=id_desc");
|
||||
if($this->app->openApp == 'execution') $response['locate'] = $this->createLink('execution', 'testcase', "executionID={$this->session->execution}&type=all");
|
||||
$this->send($response);
|
||||
}
|
||||
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
|
||||
|
||||
+15
-7
@@ -38,6 +38,14 @@ class todoModel extends model
|
||||
->remove(implode(',', $this->config->todo->moduleList) . ',uid')
|
||||
->get();
|
||||
|
||||
if($todo->type != 'custom')
|
||||
{
|
||||
$type = $todo->type;
|
||||
$object = $this->loadModel($type)->getByID($this->post->$type);
|
||||
if(isset($object->name)) $todo->name = $object->name;
|
||||
if(isset($object->title)) $todo->name = $object->title;
|
||||
}
|
||||
|
||||
if($todo->end < $todo->begin)
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->error->gt, $this->lang->todo->end, $this->lang->todo->begin);
|
||||
@@ -499,8 +507,8 @@ class todoModel extends model
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByList($todoIDList = 0)
|
||||
{
|
||||
public function getByList($todoIDList = 0)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_TODO)
|
||||
->beginIF($todoIDList)->where('id')->in($todoIDList)->fi()
|
||||
->fetchAll('id');
|
||||
@@ -698,9 +706,9 @@ class todoModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign todo.
|
||||
*
|
||||
* @param int $todoID
|
||||
* Assign todo.
|
||||
*
|
||||
* @param int $todoID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -722,8 +730,8 @@ class todoModel extends model
|
||||
|
||||
/**
|
||||
* Get todo count.
|
||||
*
|
||||
* @param string $account
|
||||
*
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user