Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
hufangzhou
2021-03-18 09:05:28 +08:00
26 changed files with 210 additions and 71 deletions
+2 -1
View File
@@ -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();
+1
View File
@@ -47,6 +47,7 @@ class build extends control
/* 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);
+6 -5
View File
@@ -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,';
+6 -6
View File
@@ -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,7 +623,6 @@ $lang->navGroup->measrecord = 'project';
$lang->navGroup->execution = 'execution';
$lang->navGroup->task = 'execution';
$lang->navGroup->build = 'execution';
$lang->navGroup->repo = 'execution';
$lang->navGroup->doc = 'doc';
+6 -5
View File
@@ -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,';
+6 -5
View File
@@ -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,';
+7 -7
View File
@@ -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,';
@@ -628,7 +629,6 @@ $lang->navGroup->measrecord = 'project';
$lang->navGroup->execution = 'execution';
$lang->navGroup->task = 'execution';
$lang->navGroup->build = 'execution';
$lang->navGroup->repo = 'execution';
$lang->navGroup->doc = 'doc';
@@ -948,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', 'projectbuild', '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', 'projectbuild', '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');
+7 -17
View File
@@ -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;
}
/**
+1 -1
View File
@@ -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)):?>
+7 -7
View File
@@ -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();
+1
View File
@@ -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
View File
@@ -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;}';
}
+31
View File
@@ -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.
*
+19
View File
@@ -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;
});
+1
View File
@@ -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";
+1
View File
@@ -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";
+1
View File
@@ -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";
+1
View File
@@ -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";
+1
View File
@@ -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}";
+73
View File
@@ -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> &nbsp;" . $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';?>
-6
View File
@@ -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]);
@@ -1152,7 +1150,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]);
@@ -1316,9 +1313,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';
+1
View File
@@ -40,6 +40,7 @@ class projectBuild extends control
$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')
{
+9 -3
View File
@@ -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;
+4 -4
View File
@@ -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>
+1 -1
View File
@@ -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'>
-1
View File
@@ -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();