* Jump to project jump link.

This commit is contained in:
leiyong
2020-09-24 13:57:14 +08:00
parent d59b3e85ce
commit 91cab45430
5 changed files with 14 additions and 11 deletions
+9 -7
View File
@@ -609,6 +609,8 @@ class program extends control
$this->lang->program->switcherMenu = $this->program->getPGMCommonAction() . $this->program->getPGMSwitcher($programID);
$this->program->setPGMViewMenu($programID);
$this->app->session->set('PRJBrowse', $this->app->getURI(true));
/* Load pager and get tasks. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
@@ -967,7 +969,6 @@ class program extends control
public function PRJGroup($projectID = 0, $programID = 0)
{
$this->lang->navGroup->program = 'project';
$this->session->set('PRJ', $projectID);
$title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->browse;
$position[] = $this->lang->group->browse;
@@ -975,12 +976,15 @@ class program extends control
$groupUsers = array();
foreach($groups as $group) $groupUsers[$group->id] = $this->group->getUserPairs($group->id);
$goback = $this->session->PRJBrowse ? $this->session->PRJBrowse : inLink('PRJBrowse', "programID=$programID");
$this->view->title = $title;
$this->view->position = $position;
$this->view->groups = $groups;
$this->view->projectID = $projectID;
$this->view->programID = $programID;
$this->view->groupUsers = $groupUsers;
$this->view->goback = $goback;
$this->display();
}
@@ -996,7 +1000,6 @@ class program extends control
public function PRJCreateGroup($projectID = 0, $programID = 0)
{
$this->lang->navGroup->program = 'project';
$this->session->set('PRJ', $projectID);
if(!empty($_POST))
{
@@ -1023,7 +1026,6 @@ class program extends control
public function PRJManageView($groupID, $projectID, $programID)
{
$this->lang->navGroup->program = 'project';
$this->session->set('PRJ', $projectID);
if($_POST)
{
@@ -1123,7 +1125,6 @@ class program extends control
public function PRJManageMembers($projectID, $dept = '')
{
$this->lang->navGroup->program = 'project';
$this->session->set('PRJ', $projectID);
if(!empty($_POST))
{
@@ -1172,6 +1173,7 @@ class program extends control
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('group', 'browse'), 'parent'));
}
$group = $this->group->getById($groupID);
$groupUsers = $this->group->getUserPairs($groupID);
$allUsers = $this->loadModel('dept')->getDeptUserPairs($deptID);
@@ -1393,7 +1395,7 @@ class program extends control
* @access public
* @return void
*/
public function PRJDelete($projectID, $confirm = 'no', $from = 'PRJ', $programID = 0)
public function PRJDelete($projectID, $confirm = 'no')
{
if($confirm == 'no')
{
@@ -1408,8 +1410,8 @@ class program extends control
$this->project->updateUserView($projectID);
$this->session->set('project', '');
$link = $from == 'PRJ' ? inLink('PRJBrowse', 'programID=' . $programID) : inLink('PGMProject', 'programID=' . $programID);
die(js::locate($link, 'parent'));
$url = $this->session->PRJBrowse ? $this->session->PRJBrowse : inLink('PRJBrowse');
die(js::locate($url, 'parent'));
}
}
+2 -1
View File
@@ -857,6 +857,7 @@ class programModel extends model
return $this->dao->select('*')->from(TABLE_PROJECT)
->where('type')->in('project,program')
->andWhere('status')->ne('closed')
->andWhere('deleted')->eq('0')
->beginIF($projectID > 0)->andWhere('path')->like($path . '%')->fi()
->orderBy('grade desc, `order`')
->get();
@@ -876,7 +877,7 @@ class programModel extends model
->where('type')->eq('project')
->beginIF($programID)->andWhere('parent')->eq($programID)->fi()
->andWhere('model')->eq($model)
->andWhere('deleted')->eq(0)
->andWhere('deleted')->eq('0')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->programs)->fi()
->orderBy('id_desc')
->fetchPairs();
+1 -1
View File
@@ -88,7 +88,7 @@ js::set('browseType', $browseType);
<?php common::printIcon('program', 'PRJSuspend', "programID=$project->id", $project, 'list', 'pause', '', 'iframe', true);?>
<?php common::printIcon('program', 'PRJClose', "programID=$project->id", $project, 'list', 'off', '', 'iframe', true);?>
<?php if(common::hasPriv('program', 'PRJEdit')) echo html::a($this->createLink("program", "PRJEdit", "programID=$project->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$lang->edit}'");?>
<?php common::printIcon('program', 'PRJDelete', "projectID=$project->id&confirm=no&from=PGM&programID=$programID", $project, 'list', 'trash', 'hiddenwin', '', true);?>
<?php common::printIcon('program', 'PRJDelete', "projectID=$project->id", $project, 'list', 'trash', 'hiddenwin', '', true);?>
</td>
</tr>
<?php endforeach;?>
+1 -1
View File
@@ -107,7 +107,7 @@ js::set('browseType', $browseType);
<?php common::printIcon('program', 'PRJSuspend', "programID=$project->id", $project, 'list', 'pause', '', 'iframe', true);?>
<?php common::printIcon('program', 'PRJClose', "programID=$project->id", $project, 'list', 'off', '', 'iframe', true);?>
<?php if(common::hasPriv('program', 'PRJEdit')) echo html::a($this->createLink("program", "PRJEdit", "programID=$project->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$lang->edit}'");?>
<?php common::printIcon('program', 'PRJDelete', "projectID=$project->id&confirm=no&from=PRJ&programID=$programID", $project, 'list', 'trash', 'hiddenwin', '', true);?>
<?php common::printIcon('program', 'PRJDelete', "projectID=$project->id", $project, 'list', 'trash', 'hiddenwin', '', true);?>
</td>
<?php if($canOrder):?>
<td class='c-actions sort-handler'><i class="icon icon-move"></i></td>
+1 -1
View File
@@ -15,7 +15,7 @@
<?php js::set('confirmDelete', $lang->group->confirmDelete);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php echo html::a(inLink('PRJBrowse', "programID=$programID"), $lang->goback, '', 'class="btn btn-secondary"');?>
<?php echo html::a($goback, $lang->goback, '', 'class="btn btn-secondary"');?>
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->group->browse;?></span></span>
</div>
<div class='btn-toolbar pull-right'>