* Modify PRJMine to involved.
This commit is contained in:
+4
-5
@@ -159,21 +159,20 @@ $filter->product->default->cookie['lastProduct'] = 'int';
|
||||
$filter->product->default->cookie['preProductID'] = 'int';
|
||||
$filter->product->index->cookie['preBranch'] = 'int';
|
||||
$filter->product->export->cookie['checkedItem'] = 'reg::checked';
|
||||
$filter->product->project->cookie['PRJMine'] = 'code';
|
||||
$filter->product->project->cookie['involved'] = 'code';
|
||||
|
||||
$filter->program->default->cookie['lastPGM'] = 'int';
|
||||
$filter->program->default->cookie['lastPRJ'] = 'int';
|
||||
$filter->program->prjbrowse->cookie['programType'] = 'code';
|
||||
$filter->program->prjbrowse->cookie['PRJMine'] = 'code';
|
||||
$filter->program->pgmproject->cookie['PRJMine'] = 'code';
|
||||
$filter->program->prjbrowse->cookie['mine'] = 'code';
|
||||
$filter->program->pgmbrowse->cookie['showClosed'] = 'code';
|
||||
$filter->program->project->cookie['involved'] = 'code';
|
||||
$filter->program->browse->cookie['showClosed'] = 'code';
|
||||
$filter->program->export->cookie['checkedItem'] = 'reg::checked';
|
||||
$filter->program->ajaxgetpgmdropmenu->cookie['showClosed'] = 'code';
|
||||
|
||||
$filter->project->default->cookie['lastProject'] = 'int';
|
||||
$filter->project->default->cookie['lastPRJ'] = 'int';
|
||||
$filter->project->default->cookie['projectMode'] = 'code';
|
||||
$filter->project->browse->cookie['involved'] = 'code';
|
||||
$filter->project->story->cookie['storyModuleParam'] = 'int';
|
||||
$filter->project->story->cookie['storyPreProjectID'] = 'int';
|
||||
$filter->project->story->cookie['storyProductParam'] = 'int';
|
||||
|
||||
@@ -349,7 +349,7 @@ $lang->execution->viewMenu->qa = array('link' => '测试|qa|index|');
|
||||
$lang->execution->viewMenu->ci = array('link' => '代码|repo|browse|');
|
||||
$lang->execution->viewMenu->doc = array('link' => '文档|doc|objectLibs|type=execution&objectID=%s&from=execution', 'subModule' => 'doc');
|
||||
$lang->execution->viewMenu->build = array('link' => '版本|execution|build|executionID=%s', 'subModule' => 'build');
|
||||
$lang->execution->viewMenu->release = array('link' => '发布|projectrelease|browse|project={PROJECT}');
|
||||
$lang->execution->viewMenu->release = array('link' => '发布|projectrelease|browse|project=%s');
|
||||
$lang->execution->viewMenu->action = array('link' => '动态|execution|dynamic|executionID=%s');
|
||||
$lang->execution->viewMenu->setting = array('link' => '设置|execution|view|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit', 'class' => 'dropdown dropdown-hover');
|
||||
|
||||
|
||||
@@ -412,7 +412,7 @@ class executionModel extends model
|
||||
$member = new stdclass();
|
||||
$member->root = $executionID;
|
||||
$member->account = $this->app->user->account;
|
||||
$member->role = $this->lang->user->roleList[$this->app->user->role];
|
||||
$member->role = zget($this->lang->user->roleList, $this->app->user->role, '');
|
||||
$member->join = $today;
|
||||
$member->type = $sprintType;
|
||||
$member->days = $sprint->days;
|
||||
|
||||
@@ -72,11 +72,11 @@ class product extends control
|
||||
* @param string $status
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param int $projectMine
|
||||
* @param int $involved
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function project($status = 'all', $productID = 0, $branch = 0, $projectMine = 0)
|
||||
public function project($status = 'all', $productID = 0, $branch = 0, $involved = 0)
|
||||
{
|
||||
$this->product->setMenu($this->products, $productID, $branch);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
@@ -88,7 +88,7 @@ class product extends control
|
||||
|
||||
/* Get PM id list. */
|
||||
$accounts = array();
|
||||
$projectStats = $this->product->getProjectStatsByProduct($productID, $status, $branch, $projectMine);
|
||||
$projectStats = $this->product->getProjectStatsByProduct($productID, $status, $branch, $involved);
|
||||
foreach($projectStats as $project)
|
||||
{
|
||||
if(!empty($project->PM) and !in_array($project->PM, $accounts)) $accounts[] = $project->PM;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
$(function()
|
||||
{
|
||||
$('#mainMenu input[name^="PRJMine"]').click(function()
|
||||
$('#mainMenu input[name^="involved"]').click(function()
|
||||
{
|
||||
var PRJMine = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('PRJMine', PRJMine, {expires:config.cookieLife, path:config.webRoot});
|
||||
var involved = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('involved', involved, {expires:config.cookieLife, path:config.webRoot});
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -875,11 +875,11 @@ class productModel extends model
|
||||
* @param int $productID
|
||||
* @param string $browseType
|
||||
* @param int $branch
|
||||
* @param int $projectMine
|
||||
* @param int $involved
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectListByProduct($productID, $browseType = 'all', $branch = 0, $projectMine = 0)
|
||||
public function getProjectListByProduct($productID, $browseType = 'all', $branch = 0, $involved = 0)
|
||||
{
|
||||
$projectList = $this->dao->select('t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
@@ -887,7 +887,7 @@ class productModel extends model
|
||||
->andWhere('t2.type')->eq('project')
|
||||
->beginIF($browseType != 'all')->andWhere('t2.status')->eq($browseType)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF($this->cookie->projectMine or $projectMine)
|
||||
->beginIF($this->cookie->involved or $involved)
|
||||
->andWhere('t2.openedBy', true)->eq($this->app->user->account)
|
||||
->orWhere('t2.PM')->eq($this->app->user->account)
|
||||
->markRight(1)
|
||||
@@ -910,13 +910,13 @@ class productModel extends model
|
||||
* @param int $productID
|
||||
* @param string $browseType
|
||||
* @param int $branch
|
||||
* @param int $projectMine
|
||||
* @param int $involved
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectStatsByProduct($productID, $browseType = 'all', $branch = 0, $projectMine = 0)
|
||||
public function getProjectStatsByProduct($productID, $browseType = 'all', $branch = 0, $involved = 0)
|
||||
{
|
||||
$projects = $this->getProjectListByProduct($productID, $browseType, $branch, $projectMine);
|
||||
$projects = $this->getProjectListByProduct($productID, $browseType, $branch, $involved);
|
||||
if(empty($projects)) return array();
|
||||
|
||||
$projectKeys = array_keys($projects);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<?php foreach($lang->execution->featureBar['all'] as $key => $label):?>
|
||||
<?php echo html::a(inlink("project", "status=$key&productID=$productID"), "<span class='text'>{$label}</span>" . ($status == $key ? " <span class='label label-light label-badge'>" . count($projectStats) . "</span>" : ''), '', "class='btn btn-link" . ($status == $key ? ' btn-active-text' : '') . "' id='{$key}Tab'");?>
|
||||
<?php endforeach;?>
|
||||
<?php echo html::checkbox('projectMine', array('1' => $lang->project->mine), '', $this->cookie->projectMine ? 'checked=checked' : '');?>
|
||||
<?php echo html::checkbox('involved', array('1' => $lang->project->mine), '', $this->cookie->involved ? 'checked=checked' : '');?>
|
||||
<div class="tip"><icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='right' data-tip-class='text-muted popover-sm' data-content=<?php echo $lang->product->projectInfo;?>></icon></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -662,7 +662,7 @@ class program extends control
|
||||
foreach($projects as $id => $name)
|
||||
{
|
||||
$active = $data->cpoyProjectID == $id ? 'active' : '';
|
||||
$html .= "<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id=$id class='nobr $active'>" . html::icon($this->lang->icons['project'], 'text-muted') . $name . "</a></div>";
|
||||
$html .= "<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id=$id class='nobr $active'>" . html::icon($this->lang->icons['project'], 'text-muted') . $name . "</a></div>";
|
||||
}
|
||||
echo $html;
|
||||
}
|
||||
@@ -691,7 +691,7 @@ class program extends control
|
||||
{
|
||||
$programs = $this->post->programs;
|
||||
foreach($programs as $id => $order)
|
||||
{
|
||||
{
|
||||
$this->dao->update(TABLE_PROJECT)
|
||||
->set('`order`')->eq($order)
|
||||
->where('id')->eq($id)
|
||||
|
||||
@@ -128,11 +128,11 @@ class programModel extends model
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @param int $programTitle
|
||||
* @param int $projectMine
|
||||
* @param int $involved
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getProjectList($programID = 0, $browseType = 'all', $queryID = 0, $orderBy = 'id_desc', $pager = null, $programTitle = 0, $projectMine = 0)
|
||||
public function getProjectList($programID = 0, $browseType = 'all', $queryID = 0, $orderBy = 'id_desc', $pager = null, $programTitle = 0, $involved = 0)
|
||||
{
|
||||
$path = '';
|
||||
if($programID)
|
||||
@@ -148,7 +148,7 @@ class programModel extends model
|
||||
->beginIF($path)->andWhere('path')->like($path . '%')->fi()
|
||||
->beginIF(!$this->app->user->admin and $this->config->systemMode == 'new')->andWhere('id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF(!$this->app->user->admin and $this->config->systemMode == 'classic')->andWhere('id')->in($this->app->user->view->sprints)->fi()
|
||||
->beginIF($this->cookie->projectMine or $projectMine)
|
||||
->beginIF($this->cookie->involved or $involved)
|
||||
->andWhere('openedBy', true)->eq($this->app->user->account)
|
||||
->orWhere('PM')->eq($this->app->user->account)
|
||||
->markRight(1)
|
||||
@@ -777,14 +777,14 @@ class programModel extends model
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @param string $programTitle
|
||||
* @param int $projectMine
|
||||
* @param int $involved
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectStats($programID = 0, $browseType = 'undone', $queryID = 0, $orderBy = 'id_desc', $pager = null, $programTitle = 0, $projectMine = 0)
|
||||
public function getProjectStats($programID = 0, $browseType = 'undone', $queryID = 0, $orderBy = 'id_desc', $pager = null, $programTitle = 0, $involved = 0)
|
||||
{
|
||||
/* Init vars. */
|
||||
$projects = $this->getProjectList($programID, $browseType, $queryID, $orderBy, $pager, $programTitle, $projectMine);
|
||||
$projects = $this->getProjectList($programID, $browseType, $queryID, $orderBy, $pager, $programTitle, $involved);
|
||||
if(empty($projects)) return array();
|
||||
|
||||
$projectKeys = array_keys($projects);
|
||||
|
||||
@@ -26,7 +26,7 @@ js::set('browseType', $browseType);
|
||||
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink('project', "programID=$programID&browseType=$key"), $label, '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
<?php echo html::checkbox('involved ', array('1' => $lang->project->mine), '', $this->cookie->PRJMine ? 'checked=checked' : '');?>
|
||||
<?php echo html::checkbox('involved ', array('1' => $lang->project->mine), '', $this->cookie->involved ? 'checked=checked' : '');?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(isset($this->config->maxVersion)):?>
|
||||
@@ -98,10 +98,10 @@ js::set('browseType', $browseType);
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#PRJMine1').click(function()
|
||||
$('input[name^="involved"]').click(function()
|
||||
{
|
||||
var PRJMine = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('PRJMine', PRJMine, {expires:config.cookieLife, path:config.webRoot});
|
||||
var involved = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('involved', involved, {expires:config.cookieLife, path:config.webRoot});
|
||||
window.location.reload();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
$(function()
|
||||
{
|
||||
$('#projectMine').click(function()
|
||||
$('input[name^="involved"]').click(function()
|
||||
{
|
||||
var mine = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('projectMine', mine, {expires:config.cookieLife, path:config.webRoot});
|
||||
var involved = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('involved', involved, {expires:config.cookieLife, path:config.webRoot});
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -35,7 +35,7 @@ js::set('browseType', $browseType);
|
||||
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink('browse', "programID=$programID&browseType=$key"), $label, '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
<?php echo html::checkbox('projectMine', array('1' => $lang->project->mine), '', $this->cookie->projectMine ? 'checked=checked' : '');?>
|
||||
<?php echo html::checkbox('involved', array('1' => $lang->project->mine), '', $this->cookie->involved ? 'checked=checked' : '');?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(isset($this->config->maxVersion)):?>
|
||||
|
||||
Reference in New Issue
Block a user