* Divide program/project/execution.

This commit is contained in:
Yagami
2021-03-04 09:59:05 +08:00
parent 8188a3fb15
commit 1ad514e0b0
33 changed files with 222 additions and 2951 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ $isQa = $rawModule == 'qa';
<?php if($isQa) echo isset($lang->qa->switcherMenu) ? $lang->qa->switcherMenu : '';?>
<?php if($this->config->systemMode == 'new'):?>
<?php if($isProgram) echo isset($lang->program->switcherMenu) ? $lang->program->switcherMenu : '';?>
<?php if($isProject) echo $this->loadModel('program')->getPRJSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?>
<?php if($isProject) echo $this->loadModel('project')->getSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?>
<?php elseif($this->config->systemMode == 'classic'):?>
<?php if($isProject) echo isset($lang->project->switcherMenu) ? $lang->project->switcherMenu : '';;?>
<?php endif;?>
@@ -31,7 +31,7 @@ $isQa = $rawModule == 'qa';
<nav id='navbar'><?php commonModel::printMainmenu($app->rawModule, $app->rawMethod);?></nav>
<div id='toolbar'>
<?php if($isProgram) echo isset($lang->program->mainMenuAction) ? $lang->program->mainMenuAction : '';?>
<?php if($isProject) echo $this->loadModel('program')->getPRJMainAction($app->rawModule, $app->rawMethod);?>
<?php if($isProject) echo $this->loadModel('project')->getMainAction($app->rawModule, $app->rawMethod);?>
<?php if($isProduct) echo isset($lang->product->mainMenuAction) ? $lang->product->mainMenuAction : '';?>
<?php if($isReport) echo isset($lang->report->mainMenuAction) ? $lang->report->mainMenuAction : '';?>
<?php if($isQa) echo isset($lang->qa->mainMenuAction) ? $lang->qa->mainMenuAction : '';?>
+7 -7
View File
@@ -29,7 +29,7 @@ class personnel extends control
$this->setProgramNavMenu($programID);
$this->app->loadLang('user');
$program = $this->loadModel('program')->getPGMByID($programID);
$program = $this->loadModel('program')->getByID($programID);
/* Set the pager. */
$this->app->loadClass('pager', true);
@@ -115,9 +115,9 @@ class personnel extends control
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Set back link. */
$goback = $this->session->PRJBrowse ? $this->session->PRJBrowse : $this->createLink('program', 'PRJWhitelist', "projectID=$objectID");
if($from == 'pgmbrowse') $goback = $this->createLink('program', 'PGMBrowse');
if($from == 'pgmproject') $goback = $this->session->PGMProject ? $this->session->PGMProject : $this->createLink('program', 'PGMProject', "programID=$programID");
$goback = $this->session->PRJBrowse ? $this->session->PRJBrowse : $this->createLink('program', 'whitelist', "projectID=$objectID");
if($from == 'pgmbrowse') $goback = $this->createLink('program', 'browse');
if($from == 'pgmproject') $goback = $this->session->programProject ? $this->session->programProject : $this->createLink('program', 'project', "programID=$programID");
$this->view->title = $this->lang->personnel->whitelist;
$this->view->position[] = $this->lang->personnel->whitelist;
@@ -225,8 +225,8 @@ class personnel extends control
{
$this->loadModel('program');
$this->lang->navGroup->program = 'program';
$this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true);
$this->lang->program->mainMenuAction = $this->program->getPGMMainAction();
$this->program->setPGMViewMenu($programID);
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
$this->lang->program->mainMenuAction = $this->program->getMainAction();
$this->program->setViewMenu($programID);
}
}
+1 -1
View File
@@ -39,7 +39,7 @@ class personnelModel extends model
}
/* Determine who can be accessed based on access control. */
$program = $this->loadModel('program')->getPGMByID($programID);
$program = $this->loadModel('program')->getByID($programID);
$personnelList = array();
if($program->acl != 'open')
{
+44 -44
View File
@@ -57,7 +57,7 @@ class program extends control
}
else
{
$programs = $this->program->getPGMList($status, $orderBy, null, true);
$programs = $this->program->getList($status, $orderBy, null, true);
}
/* Get PM id list. */
@@ -95,15 +95,15 @@ class program extends control
*/
public function product($programID = 0, $browseType = 'noclosed', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
$programID = $this->program->savePGMState($programID, $this->program->getPGMPairs());
setCookie("lastPGM", $programID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
$programID = $this->program->saveState($programID, $this->program->getPairs());
setCookie("lastProgram", $programID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
$program = $this->program->getPGMByID($programID);
$program = $this->program->getByID($programID);
if(empty($program) || $program->type != 'program') die(js::error($this->lang->notFound) . js::locate('back'));
$this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true);
$this->lang->program->mainMenuAction = $this->program->getPGMMainAction();
$this->program->setPGMViewMenu($programID);
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
$this->lang->program->mainMenuAction = $this->program->getMainAction();
$this->program->setViewMenu($programID);
/* Load pager and get tasks. */
$this->app->loadClass('pager', $static = true);
@@ -138,7 +138,7 @@ class program extends control
*/
public function create($parentProgramID = 0)
{
$parentProgram = $this->program->getPGMByID($parentProgramID);
$parentProgram = $this->program->getByID($parentProgramID);
if($_POST)
{
@@ -157,7 +157,7 @@ class program extends control
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
$this->view->parentProgram = $parentProgram;
$this->view->parents = $this->program->getParentPairs();
$this->view->programList = $this->program->getPGMList();
$this->view->programList = $this->program->getList();
$this->view->budgetUnitList = $this->project->getBudgetUnitList();
$this->view->availableBudget = $this->program->getAvailableBudget($parentProgram);
@@ -186,8 +186,8 @@ class program extends control
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('browse')));
}
$program = $this->program->getPGMByID($programID);
$parentProgram = $program->parent ? $this->program->getPGMByID($program->parent) : '';
$program = $this->program->getByID($programID);
$parentProgram = $program->parent ? $this->program->getByID($program->parent) : '';
$parents = $this->program->getParentPairs();
unset($parents[$programID]);
@@ -199,7 +199,7 @@ class program extends control
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
$this->view->program = $program;
$this->view->parents = $parents;
$this->view->programList = $this->program->getPGMList();
$this->view->programList = $this->program->getList();
$this->view->budgetUnitList = $this->program->getBudgetUnitList();
$this->view->parentProgram = $parentProgram;
$this->view->availableBudget = $this->program->getAvailableBudget($parentProgram) + (float)$program->budget;
@@ -217,13 +217,13 @@ class program extends control
public function close($programID)
{
$this->loadModel('action');
$program = $this->program->getPGMByID($programID);
$program = $this->program->getByID($programID);
if(!empty($_POST))
{
/* Only when all subprograms and subprojects are closed can the program be closed. */
$hasUnfinished = $this->program->hasUnfinished($program);
if($hasUnfinished) die(js::error($this->lang->program->PGMCloseErrorMessage));
if($hasUnfinished) die(js::error($this->lang->program->closeErrorMessage));
$changes = $this->project->close($programID);
if(dao::isError()) die(js::error(dao::getError()));
@@ -238,8 +238,8 @@ class program extends control
die(js::reload('parent.parent'));
}
$this->view->title = $this->lang->program->PGMClose;
$this->view->position[] = $this->lang->program->PGMClose;
$this->view->title = $this->lang->program->close;
$this->view->position[] = $this->lang->program->close;
$this->view->project = $program;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->actions = $this->action->getList('program', $programID);
@@ -274,7 +274,7 @@ class program extends control
$this->view->title = $this->lang->project->start;
$this->view->position[] = $this->lang->project->start;
$this->view->program = $this->program->getPGMByID($programID);
$this->view->program = $this->program->getByID($programID);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->actions = $this->action->getList('program', $programID);
$this->display();
@@ -290,7 +290,7 @@ class program extends control
public function activate($programID = 0)
{
$this->loadModel('action');
$program = $this->program->getPGMByID($programID);
$program = $this->program->getByID($programID);
if(!empty($_POST))
{
@@ -309,8 +309,8 @@ class program extends control
$dateDiff = helper::diffDate($newBegin, $program->begin);
$newEnd = date('Y-m-d', strtotime($program->end) + $dateDiff * 24 * 3600);
$this->view->title = $this->lang->program->PGMActivate;
$this->view->position[] = $this->lang->program->PGMActivate;
$this->view->title = $this->lang->program->activate;
$this->view->position[] = $this->lang->program->activate;
$this->view->program = $program;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->actions = $this->action->getList('program', $programID);
@@ -348,7 +348,7 @@ class program extends control
$this->view->position[] = $this->lang->project->suspend;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->actions = $this->action->getList('program', $programID);
$this->view->project = $this->program->getPGMByID($programID);
$this->view->project = $this->program->getByID($programID);
$this->display('project', 'suspend');
}
@@ -367,7 +367,7 @@ class program extends control
if($childrenCount) die(js::alert($this->lang->program->hasChildren));
$program = $this->dao->select('*')->from(TABLE_PROGRAM)->where('id')->eq($programID)->fetch();
if($confirm == 'no') die(js::confirm($this->lang->program->confirmDelete, $this->createLink('program', 'PGMDelete', "programID=$programID&confirm=yes")));
if($confirm == 'no') die(js::confirm($this->lang->program->confirmDelete, $this->createLink('program', 'delete', "programID=$programID&confirm=yes")));
$this->dao->update(TABLE_PROGRAM)->set('deleted')->eq(1)->where('id')->eq($programID)->exec();
$this->loadModel('action')->create('program', $programID, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED);
@@ -389,16 +389,16 @@ class program extends control
*/
public function project($programID = 0, $browseType = 'doing', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
$programID = $this->program->savePGMState($programID, $this->program->getPGMPairs());
$programID = $this->program->saveState($programID, $this->program->getPairs());
if(!$programID) $this->locate($this->createLink('program', 'browse'));
setCookie("lastPGM", $programID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
setCookie("lastProgram", $programID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
$this->app->session->set('PGMProject', $this->app->getURI(true));
$this->app->session->set('programProject', $this->app->getURI(true));
$this->app->session->set('projectList', $this->app->getURI(true));
$this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true);
$this->lang->program->mainMenuAction = $this->program->getPGMMainAction();
$this->program->setPGMViewMenu($programID);
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
$this->lang->program->mainMenuAction = $this->program->getMainAction();
$this->program->setViewMenu($programID);
$this->loadModel('datatable');
@@ -406,10 +406,10 @@ class program extends control
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
$programTitle = $this->loadModel('setting')->getItem('owner=' . $this->app->user->account . '&module=program&key=PRJProgramTitle');
$programTitle = $this->loadModel('setting')->getItem('owner=' . $this->app->user->account . '&module=program&key=programTitle');
$order = explode('_', $orderBy);
$sortField = zget($this->config->program->sortFields, $order[0], 'id') . '_' . $order[1];
$projectStats = $this->program->getPRJStats($programID, $browseType, 0, $sortField, $pager, $programTitle);
$projectStats = $this->program->getProjectStats($programID, $browseType, 0, $sortField, $pager, $programTitle);
$this->view->title = $this->lang->program->project;
$this->view->position[] = $this->lang->program->project;
@@ -417,7 +417,7 @@ class program extends control
$this->view->projectStats = $projectStats;
$this->view->pager = $pager;
$this->view->programID = $programID;
$this->view->program = $this->program->getPRJByID($programID);
$this->view->program = $this->program->getByID($programID);
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
$this->view->browseType = $browseType;
$this->view->orderBy = $orderBy;
@@ -438,9 +438,9 @@ class program extends control
*/
public function stakeholder($programID = 0, $orderBy = 't1.id_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
$this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true);
$this->lang->program->mainMenuAction = $this->program->getPGMMainAction();
$this->program->setPGMViewMenu($programID);
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
$this->lang->program->mainMenuAction = $this->program->getMainAction();
$this->program->setViewMenu($programID);
/* Load pager and get tasks. */
$this->app->loadClass('pager', $static = true);
@@ -452,7 +452,7 @@ class program extends control
$this->view->stakeholders = $this->program->getStakeholders($programID, $orderBy, $pager);
$this->view->pager = $pager;
$this->view->programID = $programID;
$this->view->program = $this->program->getPRJByID($programID);
$this->view->program = $this->program->getByID($programID);
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
$this->view->orderBy = $orderBy;
@@ -475,9 +475,9 @@ class program extends control
}
$this->loadModel('user');
$this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true);
$this->lang->program->mainMenuAction = $this->program->getPGMMainAction();
$this->program->setPGMViewMenu($programID);
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
$this->lang->program->mainMenuAction = $this->program->getMainAction();
$this->program->setViewMenu($programID);
$this->loadModel('dept');
$deptUsers = $dept === '' ? array() : $this->dept->getDeptUserPairs($dept);
@@ -486,13 +486,13 @@ class program extends control
$this->view->position[] = $this->lang->program->createStakeholder;
$this->view->programID = $programID;
$this->view->program = $this->program->getPGMByID($programID);
$this->view->program = $this->program->getByID($programID);
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed');
$this->view->deptUsers = $deptUsers;
$this->view->dept = $dept;
$this->view->depts = array('' => '') + $this->dept->getOptionMenu();
$this->view->stakeholders = $this->program->getStakeholders($programID, 't1.id_desc');
$this->view->parentStakeholders = $this->program->getStakeholdersByPGMList($parentIdList);
$this->view->parentStakeholders = $this->program->getStakeholdersByList($parentIdList);
$this->display();
}
@@ -638,7 +638,7 @@ class program extends control
$this->view->programID = $programID;
$this->view->module = $module;
$this->view->method = $method;
$this->view->programs = $this->program->getPGMList('all');
$this->view->programs = $this->program->getList('all');
$this->display();
}
@@ -676,7 +676,7 @@ class program extends control
*/
public function ajaxGetAvailableBudget($parentProgramID)
{
$parentProgram = $this->program->getPGMByID($parentProgramID);
$parentProgram = $this->program->getByID($parentProgramID);
$availableBudget = $this->program->getAvailableBudget($parentProgram);
echo number_format($availableBudget, 2);
}
@@ -723,9 +723,9 @@ class program extends control
*/
public function view($programID)
{
$program = $this->program->getPGMByID($programID);
$program = $this->program->getByID($programID);
if(!$program) die(js::error($this->lang->notFound) . js::locate('back'));
echo $this->fetch('program', 'PGMProduct', "programID=$programID");
echo $this->fetch('program', 'product', "programID=$programID");
}
}
+99 -6
View File
@@ -110,13 +110,106 @@ class programModel extends model
->andWhere('deleted')->eq(0)
->beginIF(!$this->app->user->admin)
->andWhere('id')->in($this->app->user->view->programs)
->orWhere('id')->in($this->app->user->view->projects)
->fi()
->beginIF($status != 'all')->andWhere('status')->eq($status)->fi()
->beginIF(!$this->cookie->showClosed)->andWhere('status')->ne('closed')->fi()
->orWhere('id')->in($this->app->user->view->projects)
->fi()
->beginIF($status != 'all')->andWhere('status')->eq($status)->fi()
->beginIF(!$this->cookie->showClosed)->andWhere('status')->ne('closed')->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll('id');
}
/**
* Get project list data.
*
* @param int $programID
* @param string $browseType
* @param string $queryID
* @param string $orderBy
* @param object $pager
* @param int $programTitle
* @param int $PRJMine
* @access public
* @return object
*/
public function getProjectList($programID = 0, $browseType = 'all', $queryID = 0, $orderBy = 'id_desc', $pager = null, $programTitle = 0, $PRJMine = 0)
{
$path = '';
if($programID)
{
$program = $this->getByID($programID);
$path = $program->path;
}
$projectList = $this->dao->select('*')->from(TABLE_PROJECT)
->where('deleted')->eq('0')
->beginIF($this->config->systemMode == 'new')->andWhere('type')->eq('project')->fi()
->beginIF($browseType != 'all')->andWhere('status')->eq($browseType)->fi()
->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->PRJMine or $PRJMine)
->andWhere('openedBy', true)->eq($this->app->user->account)
->orWhere('PM')->eq($this->app->user->account)
->markRight(1)
->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll('id');
/* Determine how to display the name of the program. */
if($programTitle and $this->config->systemMode == 'new')
{
$programList = $this->getPairs();
foreach($projectList as $id => $project)
{
$path = explode(',', $project->path);
$path = array_filter($path);
array_pop($path);
$programID = $programTitle == 'base' ? current($path) : end($path);
if(empty($path) || $programID == $id) continue;
$programName = isset($programList[$programID]) ? $programList[$programID] : '';
$projectList[$id]->name = $programName . '/' . $projectList[$id]->name;
}
}
return $projectList;
}
/**
* Get stakeholders by program id.
*
* @param int $programID
* @param string $orderBy
* @param object $paper
* @access public
* @return array
*/
public function getStakeholders($programID = 0, $orderBy, $pager = null)
{
return $this->dao->select('t2.account,t2.realname,t2.role,t2.qq,t2.mobile,t2.phone,t2.weixin,t2.email,t1.id,t1.type,t1.key')->from(TABLE_STAKEHOLDER)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
->where('t1.objectID')->eq($programID)
->andWhere('t1.objectType')->eq('program')
->orderBy($orderBy)
->page($pager)
->fetchAll('id');
->fetchAll();
}
/**
* Get stakeholders by program id list.
*
* @param string $programIdList
* @access public
* @return array
*/
public function getStakeholdersByPrograms($programIdList = 0)
{
return $this->dao->select('distinct user as account')->from(TABLE_STAKEHOLDER)
->where('objectID')->in($programIdList)
->andWhere('objectType')->eq('program')
->fetchAll();
}
/**
@@ -713,7 +806,7 @@ class programModel extends model
public function getProjectStats($programID = 0, $browseType = 'undone', $queryID = 0, $orderBy = 'id_desc', $pager = null, $programTitle = 0, $PRJMine = 0)
{
/* Init vars. */
$projects = $this->getPRJList($programID, $browseType, $queryID, $orderBy, $pager, $programTitle, $PRJMine);
$projects = $this->getProjectList($programID, $browseType, $queryID, $orderBy, $pager, $programTitle, $PRJMine);
if(empty($projects)) return array();
$projectKeys = array_keys($projects);
+40 -45
View File
@@ -21,37 +21,32 @@ $config->project->editor->prjview = array('id' => 'comment', 'tools' => 'sim
$config->project->list = new stdclass();
$config->project->list->exportFields = 'id,name,code,template,product,status,begin,end,budget,PM,end,desc';
$config->project->PGMCreate = new stdclass();
$config->project->PGMEdit = new stdclass();
$config->project->PGMCreate->requiredFields = 'name,begin,end';
$config->project->PGMEdit->requiredFields = 'name,begin,end';
$config->project->create = new stdclass();
$config->project->edit = new stdclass();
$config->project->create->requiredFields = 'name,code,begin,end';
$config->project->edit->requiredFields = 'name,code,begin,end';
$config->project->PRJCreate = new stdclass();
$config->project->PRJEdit = new stdclass();
$config->project->PRJCreate->requiredFields = 'name,code,begin,end';
$config->project->PRJEdit->requiredFields = 'name,code,begin,end';
$config->project->sortFields = new stdclass();
$config->project->sortFields->id = 'id';
$config->project->sortFields->begin = 'begin';
$config->project->sortFields->end = 'end';
$config->project->sortFields->PRJStatus = 'status';
$config->project->sortFields->PRJBudget = 'budget';
$config->project->sortFields = new stdclass();
$config->project->sortFields->id = 'id';
$config->project->sortFields->begin = 'begin';
$config->project->sortFields->end = 'end';
$config->project->sortFields->status = 'status';
$config->project->sortFields->budget = 'budget';
global $lang;
$config->project->datatable = new stdclass();
$config->project->datatable->defaultField = array('id', 'PRJName', 'PM', 'PRJStatus', 'begin', 'end', 'PRJBudget', 'teamCount','PRJEstimate','PRJConsume', 'PRJProgress', 'actions');
$config->project->datatable->defaultField = array('id', 'name', 'PM', 'status', 'begin', 'end', 'budget', 'teamCount','estimate','consume', 'progress', 'actions');
$config->project->datatable->fieldList['id']['title'] = 'ID';
$config->project->datatable->fieldList['id']['fixed'] = 'left';
$config->project->datatable->fieldList['id']['width'] = '60';
$config->project->datatable->fieldList['id']['required'] = 'yes';
$config->project->datatable->fieldList['PRJName']['title'] = 'PRJName';
$config->project->datatable->fieldList['PRJName']['fixed'] = 'left';
$config->project->datatable->fieldList['PRJName']['width'] = 'auto';
$config->project->datatable->fieldList['PRJName']['required'] = 'yes';
$config->project->datatable->fieldList['PRJName']['sort'] = 'no';
$config->project->datatable->fieldList['name']['title'] = 'name';
$config->project->datatable->fieldList['name']['fixed'] = 'left';
$config->project->datatable->fieldList['name']['width'] = 'auto';
$config->project->datatable->fieldList['name']['required'] = 'yes';
$config->project->datatable->fieldList['name']['sort'] = 'no';
$config->project->datatable->fieldList['PM']['title'] = 'PM';
$config->project->datatable->fieldList['PM']['fixed'] = 'no';
@@ -59,11 +54,11 @@ $config->project->datatable->fieldList['PM']['width'] = '80';
$config->project->datatable->fieldList['PM']['required'] = 'yes';
$config->project->datatable->fieldList['PM']['sort'] = 'no';
$config->project->datatable->fieldList['PRJStatus']['title'] = 'PRJStatus';
$config->project->datatable->fieldList['PRJStatus']['fixed'] = 'left';
$config->project->datatable->fieldList['PRJStatus']['width'] = '80';
$config->project->datatable->fieldList['PRJStatus']['required'] = 'no';
$config->project->datatable->fieldList['PRJStatus']['sort'] = 'yes';
$config->project->datatable->fieldList['status']['title'] = 'status';
$config->project->datatable->fieldList['status']['fixed'] = 'left';
$config->project->datatable->fieldList['status']['width'] = '80';
$config->project->datatable->fieldList['status']['required'] = 'no';
$config->project->datatable->fieldList['status']['sort'] = 'yes';
$config->project->datatable->fieldList['begin']['title'] = 'begin';
$config->project->datatable->fieldList['begin']['fixed'] = 'no';
@@ -75,10 +70,10 @@ $config->project->datatable->fieldList['end']['fixed'] = 'no';
$config->project->datatable->fieldList['end']['width'] = '100';
$config->project->datatable->fieldList['end']['required'] = 'no';
$config->project->datatable->fieldList['PRJBudget']['title'] = 'PRJBudget';
$config->project->datatable->fieldList['PRJBudget']['fixed'] = 'no';
$config->project->datatable->fieldList['PRJBudget']['width'] = '80';
$config->project->datatable->fieldList['PRJBudget']['required'] = 'yes';
$config->project->datatable->fieldList['budget']['title'] = 'budget';
$config->project->datatable->fieldList['budget']['fixed'] = 'no';
$config->project->datatable->fieldList['budget']['width'] = '80';
$config->project->datatable->fieldList['budget']['required'] = 'yes';
$config->project->datatable->fieldList['teamCount']['title'] = 'teamCount';
$config->project->datatable->fieldList['teamCount']['fixed'] = 'no';
@@ -86,23 +81,23 @@ $config->project->datatable->fieldList['teamCount']['width'] = '40';
$config->project->datatable->fieldList['teamCount']['required'] = 'no';
$config->project->datatable->fieldList['teamCount']['sort'] = 'no';
$config->project->datatable->fieldList['PRJEstimate']['title'] = 'PRJEstimate';
$config->project->datatable->fieldList['PRJEstimate']['fixed'] = 'no';
$config->project->datatable->fieldList['PRJEstimate']['width'] = '60';
$config->project->datatable->fieldList['PRJEstimate']['required'] = 'no';
$config->project->datatable->fieldList['PRJEstimate']['sort'] = 'no';
$config->project->datatable->fieldList['estimate']['title'] = 'estimate';
$config->project->datatable->fieldList['estimate']['fixed'] = 'no';
$config->project->datatable->fieldList['estimate']['width'] = '60';
$config->project->datatable->fieldList['estimate']['required'] = 'no';
$config->project->datatable->fieldList['estimate']['sort'] = 'no';
$config->project->datatable->fieldList['PRJConsume']['title'] = 'PRJConsume';
$config->project->datatable->fieldList['PRJConsume']['fixed'] = 'no';
$config->project->datatable->fieldList['PRJConsume']['width'] = '60';
$config->project->datatable->fieldList['PRJConsume']['required'] = 'no';
$config->project->datatable->fieldList['PRJConsume']['sort'] = 'no';
$config->project->datatable->fieldList['consume']['title'] = 'consume';
$config->project->datatable->fieldList['consume']['fixed'] = 'no';
$config->project->datatable->fieldList['consume']['width'] = '60';
$config->project->datatable->fieldList['consume']['required'] = 'no';
$config->project->datatable->fieldList['consume']['sort'] = 'no';
$config->project->datatable->fieldList['PRJProgress']['title'] = 'PRJProgress';
$config->project->datatable->fieldList['PRJProgress']['fixed'] = 'right';
$config->project->datatable->fieldList['PRJProgress']['width'] = '60';
$config->project->datatable->fieldList['PRJProgress']['required'] = 'no';
$config->project->datatable->fieldList['PRJProgress']['sort'] = 'no';
$config->project->datatable->fieldList['progress']['title'] = 'progress';
$config->project->datatable->fieldList['progress']['fixed'] = 'right';
$config->project->datatable->fieldList['progress']['width'] = '60';
$config->project->datatable->fieldList['progress']['required'] = 'no';
$config->project->datatable->fieldList['progress']['sort'] = 'no';
$config->project->datatable->fieldList['actions']['title'] = 'actions';
$config->project->datatable->fieldList['actions']['fixed'] = 'right';
+5 -40
View File
@@ -126,7 +126,7 @@ class project extends control
$this->view->module = $module;
$this->view->method = $method;
$this->view->normalProjectsHtml = $this->project->getTreeMenu(0, array('projectmodel', 'createPRJManageLink'), 0, 'dropmenu');
$this->view->normalProjectsHtml = $this->project->getTreeMenu(0, array('projectmodel', 'createManageLink'), 0, 'dropmenu');
$this->view->closedProjectsHtml = $closedProjectsHtml;
$this->display();
@@ -171,26 +171,6 @@ class project extends control
echo number_format($availableBudget, 2);
}
/**
* Update project order.
*
* @access public
* @return string
*/
public function updateOrder()
{
$projects = $this->post->projects;
foreach($projects as $id => $order)
{
$this->dao->update(TABLE_PROJECT)
->set('`order`')->eq($order)
->where('id')->eq($id)
->exec();
}
$this->send(array('result' => 'success'));
}
/**
* Project index view.
*
@@ -245,16 +225,16 @@ class project extends control
$projectTitle = $this->loadModel('setting')->getItem('owner=' . $this->app->user->account . '&module=project&key=PRJProjectTitle');
$order = explode('_', $orderBy);
$sortField = zget($this->config->project->sortFields, $order[0], 'id') . '_' . $order[1];
$projectStats = $this->project->getStats($projectID, $browseType, $queryID, $sortField, $pager, $projectTitle);
$projectStats = $this->loadModel('program')->getProjectStats($projectID, $browseType, $queryID, $sortField, $pager, $projectTitle);
$this->view->title = $this->lang->project->PRJBrowse;
$this->view->position[] = $this->lang->project->PRJBrowse;
$this->view->title = $this->lang->project->browse;
$this->view->position[] = $this->lang->project->browse;
$this->view->projectStats = $projectStats;
$this->view->pager = $pager;
$this->view->projectID = $projectID;
$this->view->project = $this->project->getByID($projectID);
$this->view->PRJTree = $this->project->getTreeMenu(0, array('projectmodel', 'createPRJManageLink'), 0, 'list');
$this->view->PRJTree = $this->project->getTreeMenu(0, array('projectmodel', 'createManageLink'), 0, 'list');
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
$this->view->browseType = $browseType;
$this->view->param = $param;
@@ -1210,21 +1190,6 @@ class project extends control
$this->display();
}
/**
* View a project.
*
* @param int $projectID
* @access public
* @return void
*/
public function view($projectID)
{
$project = $this->project->getPGMByID($projectID);
if(!$project) die(js::error($this->lang->notFound) . js::locate('back'));
echo $this->fetch('project', 'PGMProduct', "projectID=$projectID");
}
/**
* AJAX: Check products.
*
+24 -59
View File
@@ -24,41 +24,6 @@ class projectModel extends model
return $multiLinkedProducts;
}
/**
* Get stakeholders by project id.
*
* @param int $projectID
* @param string $orderBy
* @param object $paper
* @access public
* @return array
*/
public function getStakeholders($projectID = 0, $orderBy, $pager = null)
{
return $this->dao->select('t2.account,t2.realname,t2.role,t2.qq,t2.mobile,t2.phone,t2.weixin,t2.email,t1.id,t1.type,t1.key')->from(TABLE_STAKEHOLDER)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
->where('t1.objectID')->eq($projectID)
->andWhere('t1.objectType')->eq('project')
->orderBy($orderBy)
->page($pager)
->fetchAll();
}
/**
* Get stakeholders by project id list.
*
* @param string $projectIdList
* @access public
* @return array
*/
public function getStakeholdersByProjects($projectIdList = 0)
{
return $this->dao->select('distinct user as account')->from(TABLE_STAKEHOLDER)
->where('objectID')->in($projectIdList)
->andWhere('objectType')->eq('project')
->fetchAll();
}
/**
* Show accessDenied response.
*
@@ -507,7 +472,7 @@ class projectModel extends model
public function buildMenuQuery($projectID = 0, $type = 'list')
{
$path = '';
$project = $this->getPRJByID($projectID);
$project = $this->getByID($projectID);
if($project) $path = $project->path;
return $this->dao->select('*')->from(TABLE_PROJECT)
@@ -878,7 +843,7 @@ class projectModel extends model
if(!dao::isError())
{
$this->updateProductPGM($oldProject->parent, $project->parent, $_POST['products']);
$this->updateProductProgram($oldProject->parent, $project->parent, $_POST['products']);
$this->loadModel('project')->updateProducts($projectID, $_POST['products']);
$this->file->updateObjectID($this->post->uid, $projectID, 'project');
@@ -959,7 +924,7 @@ class projectModel extends model
if(!dao::isError())
{
$linkedProducts = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchPairs();
$this->updateProductPGM($oldProject->parent, $project->parent, $linkedProducts);
$this->updateProductProgram($oldProject->parent, $project->parent, $linkedProducts);
if($oldProject->parent != $project->parent) $this->processNode($projectID, $project->parent, $oldProject->path, $oldProject->grade);
/* When acl is open, white list set empty. When acl is private,update user view. */
@@ -972,26 +937,26 @@ class projectModel extends model
}
/**
* Update the project set of the product.
* Update the program of the product.
*
* @param int $oldProject
* @param int $newProject
* @param int $oldProgram
* @param int $newProgram
* @param array $products
* @access public
* @return void
*/
public function updateProductPGM($oldProject, $newProject, $products)
public function updateProductProgram($oldProgram, $newProgram, $products)
{
$this->loadModel('action');
/* Product belonging project set processing. */
$oldTopPGM = $this->getTopPGMByID($oldProject);
$newTopPGM = $this->getTopPGMByID($newProject);
if($oldTopPGM != $newTopPGM)
$oldTopProgram = $this->program->getTopByID($oldProgram);
$newTopProgram = $this->program->getTopByID($newProgram);
if($oldTopProgram != $newTopProgram)
{
foreach($products as $productID => $product)
{
$oldProduct = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch();
$this->dao->update(TABLE_PRODUCT)->set('project')->eq((int)$newTopPGM)->where('id')->eq((int)$productID)->exec();
$this->dao->update(TABLE_PRODUCT)->set('project')->eq((int)$newTopProgram)->where('id')->eq((int)$productID)->exec();
$newProduct = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch();
$changes = common::createChanges($oldProduct, $newProduct);
$actionID = $this->action->create('product', $productID, 'edited');
@@ -1039,9 +1004,9 @@ class projectModel extends model
$title = "title='$budgetTitle'";
}
if($id == 'estimate') $title = "title='{$project->hours->totalEstimate} {$this->lang->project->workHour}'";
if($id == 'consume') $title = "title='{$project->hours->totalConsumed} {$this->lang->project->workHour}'";
if($id == 'surplus') $title = "title='{$project->hours->totalLeft} {$this->lang->project->workHour}'";
if($id == 'estimate') $title = "title='{$project->hours->totalEstimate} {$this->lang->execution->workHour}'";
if($id == 'consume') $title = "title='{$project->hours->totalConsumed} {$this->lang->execution->workHour}'";
if($id == 'surplus') $title = "title='{$project->hours->totalLeft} {$this->lang->execution->workHour}'";
echo "<td class='$class' $title>";
switch($id)
@@ -1083,13 +1048,13 @@ class projectModel extends model
echo $project->teamCount;
break;
case 'estimate':
echo $project->hours->totalEstimate . ' ' . $this->lang->project->workHourUnit;
echo $project->hours->totalEstimate . ' ' . $this->lang->execution->workHourUnit;
break;
case 'consume':
echo $project->hours->totalConsumed . ' ' . $this->lang->project->workHourUnit;
echo $project->hours->totalConsumed . ' ' . $this->lang->execution->workHourUnit;
break;
case 'surplus':
echo $project->hours->totalLeft . ' ' . $this->lang->project->workHourUnit;
echo $project->hours->totalLeft . ' ' . $this->lang->execution->workHourUnit;
break;
case 'progress':
echo "<div class='progress-pie' data-doughnut-size='80' data-color='#00da88' data-value='{$project->hours->progress}' data-width='24' data-height='24' data-back-color='#e8edf3'><div class='progress-info'>{$project->hours->progress}%</div></div>";
@@ -1113,18 +1078,18 @@ class projectModel extends model
$from = $project->from == 'PRJ' ? 'PRJ' : 'pgmproject';
$openGroup = $project->from == 'PRJ' ? 'project' : 'project';
common::printIcon('project', 'PRJEdit', "projectID=$project->id&from=$from", $project, 'list', 'edit', '', '', '', "data-group=$openGroup", '', $project->id);
common::printIcon('project', 'PRJManageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', '', $this->lang->project->team, $project->id);
if($this->config->systemMode == 'new') common::printIcon('project', 'PRJGroup', "projectID=$project->id&projectID=$projectID", $project, 'list', 'lock', '', '', '', '', '', $project->id);
common::printIcon('project', 'edit', "projectID=$project->id&from=$from", $project, 'list', 'edit', '', '', '', "data-group=$openGroup", '', $project->id);
common::printIcon('project', 'manageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', '', $this->lang->execution->team, $project->id);
if($this->config->systemMode == 'new') common::printIcon('project', 'group', "projectID=$project->id&projectID=$projectID", $project, 'list', 'lock', '', '', '', '', '', $project->id);
if(common::hasPriv('project','PRJManageProducts') || common::hasPriv('project','PRJWhitelist') || common::hasPriv('project','PRJDelete'))
if(common::hasPriv('project','manageProducts') || common::hasPriv('project','whitelist') || common::hasPriv('project','delete'))
{
echo "<div class='btn-group'>";
echo "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-more-alt'></i></button>";
echo "<ul class='dropdown-menu pull-right text-center' role='menu'>";
common::printIcon('project', 'PRJManageProducts', "projectID=$project->id&projectID=$projectID&from=$from", $project, 'list', 'link', '', 'btn-action', '', "data-group=$openGroup", $this->lang->project->manageProducts, $project->id);
if($this->config->systemMode == 'new') common::printIcon('project', 'PRJWhitelist', "projectID=$project->id&projectID=$projectID&module=project&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', "data-group=$openGroup", '', $project->id);
if(common::hasPriv('project','PRJDelete')) echo html::a(inLink("PRJDelete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$this->lang->project->PRJDelete}'");
common::printIcon('project', 'manageProducts', "projectID=$project->id&projectID=$projectID&from=$from", $project, 'list', 'link', '', 'btn-action', '', "data-group=$openGroup", $this->lang->project->manageProducts, $project->id);
if($this->config->systemMode == 'new') common::printIcon('project', 'whitelist', "projectID=$project->id&projectID=$projectID&module=project&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', "data-group=$openGroup", '', $project->id);
if(common::hasPriv('project','delete')) echo html::a(inLink("delete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$this->lang->project->delete}'");
echo "</ul>";
echo "</div>";
}
-77
View File
@@ -1,77 +0,0 @@
<?php
/**
* The suspend file of project 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<wwccss@gmail.com>
* @package project
* @version $Id: suspend.html.php 935 2013-01-16 07:49:24Z wwccss@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::import($jsRoot . 'misc/date.js');?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
<?php if(!isonlybody()):?>
<small><?php echo $lang->arrow . $lang->project->activate;?></small>
<?php endif;?>
</h2>
</div>
<form class='load-indicator main-form' method='post' target='hiddenwin'>
<table class='table table-form'>
<tr style='height:50px;'>
<th class='w-70px'><?php echo $lang->project->dateRange;?></th>
<td class='muted' colspan='2'>
<div id='sourceTimeBox'><?php echo $project->begin . ' ~ ' . $project->end;?></div>
<div id='readjustTimeBox' class='hide'>
<div class='input-group'>
<?php echo html::input('begin', $newBegin, "class='form-control form-date'")?>
<span class='input-group-addon'> ~ </span>
<?php echo html::input('end', $newEnd, "class='form-control form-date'");?>
</div>
</div>
</td>
<td colspan='3'>
<div class='clearfix row'>
<div class='col-md-6 pull-left'>
<div class="checkbox-primary"><input name="readjustTime" value="1" id="readjustTime" type="checkbox"><label for="readjustTime" class="no-margin"><?php echo $lang->project->readjustTime;?></label></div>
</div>
</div>
</td>
</tr>
<tr class='hide'>
<th><?php echo $lang->project->status;?></th>
<td><?php echo html::hidden('status', 'doing');?></td>
</tr>
<?php $this->printExtendFields($project, 'table', 'columns=5');?>
<tr>
<th><?php echo $lang->comment;?></th>
<td colspan='5'><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td class='text-center form-actions' colspan='6'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->taskList, 'self', '', 'btn btn-wide'); ?></td>
</tr>
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
</div>
<script>
$(function()
{
$('#readjustTime').change(function()
{
$('#sourceTimeBox').toggle(!$(this).prop('checked'))
$('#readjustTimeBox').toggle($(this).prop('checked'))
$('#readjustTaskBox').toggleClass('hidden')
})
})
</script>
<?php include '../../common/view/footer.html.php';?>
-62
View File
@@ -1,62 +0,0 @@
<?php
/**
* The html template file of PGMBrowse method of project 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 ZenTaoPMS
* @version $Id
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/sortable.html.php';?>
<?php js::set('status', $status);?>
<?php js::set('orderBy', $orderBy);?>
<?php if($projectType == 'bygrid'):?>
<style> #mainMenu{padding-left: 10px; padding-right: 10px;} </style>
<?php endif;?>
<div id='mainMenu' class='clearfix'>
<div class="btn-toolBar pull-left">
<?php foreach($lang->project->PGMFeatureBar as $key => $label):?>
<?php $active = $status == $key ? 'btn-active-text' : '';?>
<?php $label = "<span class='text'>$label</span>";?>
<?php echo html::a(inlink('pgmbrowse', "status=$key&orderBy=$orderBy"), $label, '', "class='btn btn-link $active'");?>
<?php endforeach;?>
<?php echo html::checkbox('showClosed', array('1' => $lang->project->PGMShowClosed), '', $this->cookie->showClosed ? 'checked=checked' : '');?>
</div>
<div class='pull-right'>
<?php if(isset($lang->pageActions)) echo $lang->pageActions;?>
<?php if(isset($this->config->maxVersion)):?>
<?php common::printLink('project', 'createGuide', "projectID=0&from=PGM", '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?>
<?php elseif($this->config->systemMode == 'new'):?>
<?php common::printLink('project', 'prjcreate', "mode=scrum&projectID=0&from=PGM", '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-primary"');?>
<?php else:?>
<?php common::printLink('project', 'create', '', '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-primary"');?>
<?php endif;?>
</div>
</div>
<div id='mainContent' class='main-row'>
<?php if(empty($projects)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->project->noPGM;?></span>
<?php common::printLink('project', 'pgmcreate', '', "<i class='icon icon-plus'></i> " . $lang->project->PGMCreate, '', "class='btn btn-info'");?>
</p>
</div>
<?php else:?>
<div class='main-col'>
<?php
if($projectType == 'bygrid')
{
include 'pgmbrowsebygrid.html.php';
}
else
{
include 'pgmbrowsebylist.html.php';
}
?>
</div>
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php';?>
@@ -1,163 +0,0 @@
<div class='row cell' id='cards'>
<?php foreach ($projects as $projectID => $project):?>
<div class='col' data-id='<?php echo $projectID?>'>
<div class='panel' data-url='<?php echo $this->createLink('project', 'index', "projectID=$project->id", '', '', $project->id);?>'>
<div class='panel-heading'>
<strong class='project-name' title='<?php echo $project->name;?>'><?php echo $project->name;?></strong>
<?php if($project->model === 'waterfall'): ?>
<span class='project-type-label label label-warning label-outline'><?php echo $lang->project->waterfall; ?></span>
<?php else: ?>
<span class='project-type-label label label-info label-outline'><?php echo $lang->project->scrum; ?></span>
<?php endif; ?>
<nav class='panel-actions nav nav-default'>
<li class='dropdown'>
<a href='javascript:;' data-toggle='dropdown' class='panel-action'><i class='icon icon-ellipsis-v'></i></a>
<ul class='dropdown-menu pull-right'>
<li><?php common::printIcon('project', 'group', "projectID=$project->id", $project, 'button', 'group');?></li>
<li><?php common::printIcon('project', 'manageMembers', "projectID=$project->id", $project, 'button', 'persons');?></li>
<li><?php common::printicon('project', 'activate', "projectid=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php if(common::hasPriv('project', 'edit')) echo html::a($this->createLink("project", "edit", "projectID=$project->id"), "<i class='icon-edit'></i> " . $lang->edit, '', "");?></li>
<li><?php common::printIcon('project', 'start', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php common::printIcon('project', 'suspend', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php common::printIcon('project', 'close', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php if(common::hasPriv('project', 'delete')) echo html::a($this->createLink("project", "delete", "projectID=$project->id"), "<i class='icon-trash'></i> " . $lang->delete, 'hiddenwin', "");?></li>
</ul>
</li>
</nav>
</div>
<div class='panel-body'>
<div class='project-infos'>
<span><i class='icon icon-group'></i> <?php printf($lang->project->membersUnit, $project->teamCount); ?></span>
<span><i class='icon icon-clock'></i> <?php printf($lang->project->hoursUnit, $project->estimate); ?></span>
<span><i class='icon icon-cost'></i> <?php echo $project->budget . '' . zget($lang->project->unitList, $project->budgetUnit);?></span>
</div>
<?php if($project->model === 'waterfall'): ?>
<div class='project-detail project-stages'>
<p class='text-muted'><?php echo $lang->project->ongoingStage; ?></p>
<?php
$projectProjects = array();
foreach($project->projects as $project)
{
if(!$project->parent) $projectProjects[] = $project;
}
?>
<?php if(empty($projectProjects)): ?>
<div class='label label-outline'><?php echo zget($lang->project->statusList, $project->status);?></div>
<?php else: ?>
<div class='project-stages-container scrollbar-hover'>
<div class='project-stages-row'>
<?php foreach ($projectProjects as $project): ?>
<div class='project-stage-item is-<?php echo $project->status;?><?php if($project->status !== 'wait') echo ' is-going'; ?>'>
<div><?php echo $project->name; ?></div>
</div>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
</div>
<?php else: ?>
<?php $project = $project->projects ? current($project->projects) : '';?>
<div class='project-detail project-iteration'>
<p class='text-muted'><?php echo $lang->project->lastIteration; ?></p>
<?php if($project):?>
<div class='row'>
<div class='col-xs-5'><?php echo $project->name; ?></div>
<div class='col-xs-7'>
<div class="progress progress-text-left">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $project->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $project->hours->progress;?>%">
<span class="progress-text"><?php echo $project->hours->progress;?>%</span>
</div>
</div>
</div>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php endforeach;?>
<div class='col-xs-12' id='cardsFooter'>
<?php $pager->show('right', 'pagerjs');?>
</div>
</div>
<style>
#mainMenu {padding-left: 10px; padding-right: 10px;}
#cards {margin: 0 10px;}
#cards > .col {width: 20%;}
#cards .panel {margin: 10px 0; border: 1px solid #DCDCDC; border-radius: 2px; box-shadow: none; height: 146px; cursor: pointer;}
#cards .panel:hover {border-color: #006AF1; box-shadow: 0 0 10px 0 rgba(0,0,100,.25);}
#cards .panel-heading {padding: 12px 24px 10px 16px;}
#cards .panel-body {padding: 0 16px 16px;}
#cards .panel-actions {padding: 7px 0;}
#cards .panel-actions .dropdown-menu > li > a {padding-left: 5px; text-align: left;}
#cards .panel-actions .dropdown-menu > li > a > i {opacity: .5; display: inline-block; margin-right: 4px; width: 18px; text-align: center;}
#cards .panel-actions .dropdown-menu > li > a:hover > i {opacity: 1;}
#cards .project-type-label {padding: 1px 2px;}
#cards .project-name {font-size: 16px; font-weight: normal; display: inline-block; max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;}
#cards .project-infos {font-size: 12px;}
#cards .project-infos > span {display: inline-block; line-height: 12px;}
#cards .project-infos > span > .icon {font-size: 12px; display: inline-block; position: relative; top: -1px}
#cards .project-infos > span + span {margin-left: 15px;}
#cards .project-detail {position: absolute; bottom: 16px; left: 16px; right: 16px; font-size: 12px;}
#cards .project-detail > p {margin-bottom: 8px;}
#cards .project-detail .progress {height: 4px;}
#cards .project-detail .progress-text-left .progress-text {width: 50px; left: -50px;}
#cards .pager {margin: 0; float: right;}
#cards .pager .btn {border: none}
#cards .project-stages-container {margin: 0 -16px -16px -16px; padding: 0 4px; height: 46px; overflow-x: auto; position: relative;}
#cards .project-stages:after {content: ' '; width: 30px; display: block; right: -16px; top: 16px; bottom: -6px; z-index: 1; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); position: absolute;}
#cards .project-stages-row {position: relative; height: 30px; z-index: 0;}
#cards .project-stage-item {white-space: nowrap; position: absolute; top: 0; min-width: 48px; padding-top: 13px; color: #838A9D;}
#cards .project-stage-item > div {white-space: nowrap; overflow: visible; text-align: center; text-overflow: ellipsis;}
#cards .project-stage-item:before {content: ' '; display: block; width: 8px; height: 8px; border-radius: 50%; background: #D1D1D1; position: absolute; left: 50%; margin-left: -4px; top: 0; z-index: 1;}
#cards .project-stage-item + .project-stage-item:after {content: ' '; display: block; left: -50%; right: 50%; height: 2px; background-color: #D1D1D1; top: 3px; position: absolute; z-index: 0;}
#cards .project-stage-item.is-going {color: #333;}
#cards .project-stage-item.is-going::before {background-color: #0C64EB;}
</style>
<script>
$(function()
{
/* Auto resize cards size */
var minCardWidth = 280;
var $cards = $('#cards');
var resizeCards = function()
{
var cardsWidth = $cards.width();
var bestColsSize = 1;
while((cardsWidth / (bestColsSize + 1)) > minCardWidth)
{
bestColsSize++;
}
$cards.children('.col').css('width', (100 / bestColsSize) + '%');
};
resizeCards();
$(window).on('resize', resizeCards);
/* Auto resize stages */
$cards.find('.project-stages-container').each(function()
{
var $container = $(this);
var $row = $container.children();
var totalWidth = 0;
$row.children().each(function()
{
var $item = $(this);
$item.css('left', totalWidth);
totalWidth += $item.width();
});
$row.css('minWidth', totalWidth);
});
/* Make cards clickable */
$cards.on('click', '.panel', function(e)
{
if(!$(e.target).closest('.panel-actions').length)
{
window.location.href = $(this).data('url');
}
});
});
</script>
@@ -1,171 +0,0 @@
<?php $canOrder = (common::hasPriv('project', 'updateOrder') and strpos($orderBy, 'order') !== false)?>
<form class='main-table' id='projectForm' method='post' data-ride='table' data-nested='true' data-expand-nest-child='false' data-checkable='false'>
<table class='table has-sort-head table-fixed table-nested' id='projectList'>
<?php $vars = "status=$status&orderBy=%s";?>
<thead>
<tr>
<th class='table-nest-title'>
<a class='table-nest-toggle table-nest-toggle-global' data-expand-text='<?php echo $lang->expand; ?>' data-collapse-text='<?php echo $lang->collapse; ?>'></a>
<?php echo $lang->project->PGMName;?>
</th>
<th class='w-100px'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->project->PGMPM);?></th>
<th class='text-right w-100px'><?php common::printOrderLink('budget', $orderBy, $vars, $lang->project->PGMBudget);?></th>
<th class='w-90px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->project->PGMStatus);?></th>
<th class='w-100px'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->project->begin);?></th>
<th class='w-100px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->project->end);?></th>
<th class='text-center w-180px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody id='projectTableList'>
<?php $originOrders = array(); ?>
<?php foreach($projects as $project):?>
<?php
$trClass = '';
$trAttrs = "data-id='$project->id' data-order='$project->order' data-parent='$project->parent'";
if($project->type == 'project')
{
$trAttrs .= " data-nested='true'";
$trClass .= $project->parent == '0' ? ' is-top-level table-nest-child-hide' : ' table-nest-hide';
}
if($project->parent and isset($projects[$project->parent]))
{
if($project->type != 'project') $trClass .= ' is-nest-child';
if(empty($project->path)) $project->path = $projects[$project->parent]->path . "$project->id,";
$trClass .= ' table-nest-hide';
$trAttrs .= " data-nest-parent='$project->parent' data-nest-path='$project->path'";
}
elseif($project->type != 'project')
{
$trClass .= ' no-nest';
}
$trAttrs .= " class='$trClass'";
$originOrders[] = $project->order;
?>
<tr <?php echo $trAttrs;?>>
<td class='c-name text-left <?php if($canOrder) echo 'sort-handler';?>' title='<?php echo $project->name?>'>
<span class="table-nest-icon icon icon-<?php echo $project->type; ?>"></span>
<?php if($project->type == 'project'):?>
<?php echo html::a($this->createLink('project', 'pgmproduct', "projectID=$project->id"), $project->name);?>
<?php else:?>
<?php echo html::a($this->createLink('project', 'index', "projectID=$project->id", '', '', $project->id), $project->name);?>
<?php endif;?>
</td>
<td>
<?php $userID = isset($PMList[$project->PM]) ? $PMList[$project->PM]->id : ''?>
<?php if(!empty($project->PM)) echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), zget($users, $project->PM), '', "data-toggle='modal' data-type='iframe' data-width='600'");?>
</td>
<?php $projectBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) && $project->budget >= 10000 ? number_format($project->budget / 10000, 1) . $lang->project->tenThousand : number_format((float)$project->budget, 1);?>
<td class='text-right'><?php echo $project->budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $lang->project->future;?></td>
<td class='c-status'><span class="status-project status-<?php echo $project->status?>"><?php echo zget($lang->project->statusList, $project->status, '');?></span></td>
<td><?php echo $project->begin;?></td>
<td><?php echo $project->end == LONG_TIME ? $lang->project->PRJLongTime : $project->end;?></td>
<td class='c-actions'>
<?php if($project->type == 'project'):?>
<?php if($project->status == 'wait' || $project->status == 'suspended') common::printIcon('project', 'PGMStart', "projectID=$project->id", $project, 'list', 'play', '', 'iframe', true, '', $this->lang->project->PGMStart);?>
<?php if($project->status == 'doing') common::printIcon('project', 'PGMClose', "projectID=$project->id", $project, 'list', 'off', '', 'iframe', true);?>
<?php if($project->status == 'closed') common::printIcon('project', 'PGMActivate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe', true);?>
<?php if(common::hasPriv('project', 'PGMSuspend') || (common::hasPriv('project', 'PGMClose') && $project->status != 'doing') || (common::hasPriv('project', 'PGMActivate') && $project->status != 'closed')):?>
<div class='btn-group'>
<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='dropdown' title="<?php echo $this->lang->more;?>" style="width: 16px; padding-left: 0px;"></button>
<ul class='dropdown-menu pull-right text-center' role='menu' style="min-width:auto; padding: 5px 10px;">
<?php common::printIcon('project', 'PGMSuspend', "projectID=$project->id", $project, 'list', 'pause', '', 'iframe', true, '', $this->lang->project->PGMSuspend);?>
<?php if($project->status != 'doing') common::printIcon('project', 'PGMClose', "projectID=$project->id", $project, 'list', 'off', '', 'iframe', true);?>
<?php if($project->status != 'closed') common::printIcon('project', 'PGMActivate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe', true);?>
</ul>
</div>
<?php endif;?>
<?php common::printIcon('project', 'PGMEdit', "projectID=$project->id", '', 'list', 'edit');?>
<?php common::printIcon('project', 'PGMCreate', "projectID=$project->id", '', 'list', 'split', '', '', '', '', $this->lang->project->PGMChildren);?>
<?php if(common::hasPriv('project', 'PGMDelete')) echo html::a($this->createLink("project", "PGMDelete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$this->lang->project->PGMDelete}'");?>
<?php else:?>
<?php if($project->status == 'wait' || $project->status == 'suspended') common::printIcon('project', 'PRJStart', "projectID=$project->id", $project, 'list', 'play', '', 'iframe', true);?>
<?php if($project->status == 'doing') common::printIcon('project', 'PRJClose', "projectID=$project->id", $project, 'list', 'off', '', 'iframe', true);?>
<?php if($project->status == 'closed') common::printIcon('project', 'PRJActivate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe', true);?>
<?php if(common::hasPriv('project', 'PRJSuspend') || (common::hasPriv('project', 'PRJClose') && $project->status != 'doing') || (common::hasPriv('project', 'PRJActivate') && $project->status != 'closed')):?>
<div class='btn-group'>
<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='dropdown' title="<?php echo $this->lang->more;?>" style="width: 16px; padding-left: 0px;"></button>
<ul class='dropdown-menu pull-right text-center' role='menu' style="min-width:auto; padding: 5px 10px;">
<?php common::printIcon('project', 'PRJSuspend', "projectID=$project->id", $project, 'list', 'pause', '', 'iframe', true);?>
<?php if($project->status != 'doing') common::printIcon('project', 'PRJClose', "projectID=$project->id", $project, 'list', 'off', '', 'iframe', true);?>
<?php if($project->status != 'closed') common::printIcon('project', 'PRJActivate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe', true);?>
</ul>
</div>
<?php endif;?>
<?php common::printIcon('project', 'PRJEdit', "projectID=$project->id&from=pgmbrowse", $project, 'list', 'edit', '', '', '', "data-group='project'", '', $project->id);?>
<?php common::printIcon('project', 'PRJManageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', 'data-group="project"', '', $project->id);?>
<?php common::printIcon('project', 'PRJGroup', "projectID=$project->id", $project, 'list', 'lock', '', '', '', 'data-group="project"', '', $project->id);?>
<?php if(common::hasPriv('project', 'PRJManageProducts') || common::hasPriv('project', 'PRJWhitelist') || common::hasPriv('project', 'PRJDelete')):?>
<div class='btn-group'>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown' title="<?php echo $this->lang->more;?>"><i class='icon-more-alt'></i></button>
<ul class='dropdown-menu pull-right text-center' role='menu'>
<?php common::printIcon('project', 'PRJManageProducts', "projectID=$project->id&projectID=0&from=pgmbrowse", $project, 'list', 'link', '', '', '', "data-group='project'", '', $project->id);?>
<?php common::printIcon('project', 'PRJWhitelist', "projectID=$project->id&projectID=0&module=project&from=pgmbrowse", $project, 'list', 'shield-check', '', '', '', "data-group='project'", '', $project->id);?>
<?php if(common::hasPriv('project','PRJDelete')) echo html::a($this->createLink("project", "PRJDelete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$this->lang->project->PRJDelete}' data-group='project'");?>
</ul>
</div>
<?php endif;?>
<?php endif;?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</form>
<style>
#projectTableList.sortable-sorting > tr {opacity: 0.7}
#projectTableList.sortable-sorting > tr.drag-row {opacity: 1;}
#projectTableList > tr.drop-not-allowed {opacity: 0.1!important}
#projectList .c-actions {overflow: visible;}
#projectTableList > tr:last-child .c-actions .dropdown-menu {top: auto; bottom: 100%; margin-bottom: -5px;}
#projectTableList .icon-project:before, #projectTableList .no-nest .icon-project:before, #projectTableList .is-nest-child .icon-project:before {content: '\e99c'; width: 22px; height: 22px; background: none; color: #16a8f8; top: 0; line-height: 22px; margin-right: 2px; font-size: 14px}
#projectTableList .no-nest .icon-project:before, #projectTableList .is-nest-child .icon-project:before {content: '\e944'; color: #ffe066; font-size: 16px;}
</style>
<?php js::set('originOrders', $originOrders);?>
<script>
$(function()
{
/* Init orders numbers list */
var ordersList = [];
for(var i = 0; i < originOrders.length; ++i) ordersList.push(parseInt(originOrders[i]));
ordersList.sort(function(x, y){return x - y;});
var $list = $('#projectTableList');
$list.addClass('sortable').sortable(
{
reverse: orderBy === 'order_desc',
selector: 'tr',
dragCssClass: 'drag-row',
trigger: $list.find('.sort-handler').length ? '.sort-handler' : null,
canMoveHere: function($ele, $target)
{
return $ele.data('parent') === $target.data('parent');
},
start: function(e)
{
e.targets.filter('[data-parent!="' + e.element.attr('data-parent') + '"]').addClass('drop-not-allowed');
},
finish: function(e)
{
var projects = '';
e.list.each(function()
{
projects += $(this.item).data('id') + ',' ;
});
$.post(createLink('project', 'PRJUpdateOrder'), {'projects' : projects, 'orderBy' : orderBy});
var $thead = $list.closest('table').children('thead');
$thead.find('.headerSortDown, .headerSortUp').removeClass('headerSortDown headerSortUp').addClass('header');
$thead.find('th.sort-default .header').removeClass('header').addClass('headerSortDown');
e.element.addClass('drop-success');
setTimeout(function(){e.element.removeClass('drop-success');}, 800);
$list.children('.drop-not-allowed').removeClass('drop-not-allowed');
$('#projectForm').table('initNestedList')
}
});
});
</script>
-166
View File
@@ -1,166 +0,0 @@
<?php
/**
* The pgmcreate view of project 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 project
* @version $Id: pgmcreate.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php if(isset($tips)):?>
<?php $defaultURL = $this-> createLink('project', 'task', 'projectID=' . $projectID);?>
<?php include '../../common/view/header.lite.html.php';?>
<body>
<div class='modal-dialog mw-500px' id='tipsModal'>
<div class='modal-header'>
<a href='<?php echo $defaultURL;?>' class='close'><i class="icon icon-close"></i></a>
<h4 class='modal-title' id='myModalLabel'><?php echo $lang->project->tips;?></h4>
</div>
<div class='modal-body'>
<?php echo $tips;?>
</div>
</div>
</body>
</html>
<?php exit;?>
<?php endif;?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'misc/date.js');?>
<?php js::set('weekend', $config->project->weekend);?>
<?php js::set('holders', $lang->project->placeholder);?>
<?php js::set('errorSameProducts', $lang->project->errorSameProducts);?>
<?php js::set('longTime', $lang->project->PRJLongTime);?>
<?php js::set('currencySymbol', $lang->project->currencySymbol);?>
<?php js::set('PGMParentBudget', $lang->project->PGMParentBudget);?>
<?php js::set('future', $lang->project->future);?>
<?php js::set('PGMList', $PGMList);?>
<?php $aclList = $parentProgram ? $lang->project->subPGMAclList : $lang->project->PGMAclList;?>
<?php $requiredFields = $config->project->PGMCreate->requiredFields;?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->project->PGMCreate;?></h2>
</div>
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->project->PGMParent;?></th>
<td><?php echo html::select('parent', $parents, isset($parentProgram->id) ? $parentProgram->id : 0, "class='form-control chosen' onchange=setBudgetTipsAndAclList(this.value)");?>
<td></td>
</tr>
<tr>
<th class='w-120px'><?php echo $lang->project->PGMName;?></th>
<td class="col-main"><?php echo html::input('name', '', "class='form-control' required");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->project->PGMPM;?></th>
<td><?php echo html::select('PM', $pmUsers, '', "class='form-control chosen'" . (strpos($requiredFields, 'PM') !== false ? ' required' : ''));?></td>
</tr>
<tr>
<th><?php echo $lang->project->PGMBudget;?></th>
<td>
<div class='input-group'>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->project->PGMParentBudget . zget($lang->project->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
<?php echo html::input('budget', '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . $placeholder);?>
<?php if($parentProgram):?>
<span class='input-group-addon fix-border'><?php echo zget($budgetUnitList, $parentProgram->budgetUnit);?></span>
<?php else:?>
<span class='input-group-addon fix-border'></span>
<?php echo html::select('budgetUnit', $budgetUnitList, $config->project->defaultCurrency, "class='form-control'");?>
<?php endif;?>
</div>
</td>
<td>
<div class='checkbox-primary future w-70px'>
<input type='checkbox' id='future' name='future' value='1' />
<label for='future'><?php echo $lang->project->future;?></label>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->dateRange;?></th>
<td>
<div class='input-group'>
<?php echo html::input('begin', date('Y-m-d'), "class='form-control form-date' placeholder='" . $lang->project->begin . "' required");?>
<span class='input-group-addon'><?php echo $lang->project->to;?></span>
<?php echo html::input('end', '', "class='form-control form-date' placeholder='" . $lang->project->end . "' required");?>
</div>
</td>
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , '', "onclick='computeEndDate(this.value)'");?></td>
</tr>
<tr class='hide'>
<th><?php echo $lang->project->status;?></th>
<td><?php echo html::hidden('status', 'wait');?></td>
<td></td>
<td></td>
<td></td>
</tr>
<?php $this->printExtendFields('', 'table');?>
<tr>
<th><?php echo $lang->project->PGMDesc;?></th>
<td colspan='3'>
<?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?>
</td>
</tr>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $aclList, 'private', "onclick='setWhite(this.value);'", 'block'));?></td>
</tr>
<tr id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td><?php echo html::select('whitelist[]', $users, '', 'class="form-control chosen" multiple');?></td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan='4' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</table>
</form>
</div>
</div>
<div class='modal fade modal-scroll-inside' id='copyProjectModal'>
<div class='modal-dialog mw-900px'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal'><i class="icon icon-close"></i></button>
<h4 class='modal-title' id='myModalLabel'><?php echo $lang->project->copyTitle;?></h4>
</div>
<div class='modal-body'>
<?php if(count($projects) == 1):?>
<div class='alert with-icon'>
<i class='icon-exclamation-sign'></i>
<div class='content'><?php echo $lang->project->copyNoProject;?></div>
</div>
<?php else:?>
<div id='copyProjects' class='row'>
<?php foreach ($projects as $id => $name):?>
<?php if(empty($id)):?>
<?php if($copyProgramID != 0):?>
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='' class='cancel'><?php echo html::icon($lang->icons['cancel']) . ' ' . $lang->project->cancelCopy;?></a></div>
<?php endif;?>
<?php else: ?>
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='<?php echo $id;?>' class='nobr <?php echo ($copyProgramID == $id) ? ' active' : '';?>'><?php echo html::icon($lang->icons['project'], 'text-muted') . ' ' . $name;?></a></div>
<?php endif; ?>
<?php endforeach;?>
</div>
<?php endif;?>
</div>
</div>
</div>
<div id='PGMAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->PGMAclList, 'private', "onclick='setWhite(this.value);'", 'block'));?>
</div>
<div id='subPGMAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->subPGMAclList, 'private', "onclick='setWhite(this.value);'", 'block'));?>
</div>
<?php js::set('parentProgramID', isset($parentProgram->id) ? $parentProgram->id : 0);?>
<?php include '../../common/view/footer.html.php';?>
-116
View File
@@ -1,116 +0,0 @@
<?php
/**
* The edit view of project 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 project
* @version $Id: create.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::set('weekend', $config->project->weekend);?>
<?php js::set('longTime', $lang->project->PRJLongTime);?>
<?php js::set('currencySymbol', $lang->project->currencySymbol);?>
<?php js::set('PGMParentBudget', $lang->project->PGMParentBudget);?>
<?php js::set('future', $lang->project->future);?>
<?php js::set('PGMList', $PGMList);?>
<?php $aclList = $project->parent ? $lang->project->subPGMAclList : $lang->project->PGMAclList;?>
<?php $requiredFields = $config->project->PGMEdit->requiredFields;?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->project->PGMEdit;?></h2>
</div>
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->project->PGMParent;?></th>
<td class="col-main"><?php echo html::select('parent', $parents, $project->parent, "class='form-control chosen' onchange=setBudgetTipsAndAclList(this.value)");?></td>
<td></td><td></td>
</tr>
<tr>
<th class='w-120px'><?php echo $lang->project->PGMName;?></th>
<td class="col-main"><?php echo html::input('name', $project->name, "class='form-control' required");?></td>
</tr>
<tr>
<th><?php echo $lang->project->PGMPM;?></th>
<td><?php echo html::select('PM', $pmUsers, $project->PM, "class='form-control chosen'" . (strpos($requiredFields, 'PM') !== false ? ' required' : ''));?></td>
</tr>
<tr>
<th><?php echo $lang->project->PGMBudget;?></th>
<td>
<div class='input-group'>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->project->PGMParentBudget . zget($lang->project->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
<?php echo html::input('budget', $project->budget != 0 ? $project->budget : '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . ($project->budget == 0 ? 'disabled ' : '') . $placeholder);?>
<?php if($parentProgram):?>
<span class='input-group-addon'><?php echo zget($budgetUnitList, $parentProgram->budgetUnit);?></span>
<?php else:?>
<span class='input-group-addon'></span>
<?php echo html::select('budgetUnit', $budgetUnitList, $project->budgetUnit, "class='form-control'");?>
<?php endif;?>
</div>
</td>
<td>
<div class='checkbox-primary future w-70px'>
<input type='checkbox' id='future' name='future' value='1' <?php if($project->budget == 0) echo 'checked';?> />
<label for='future'><?php echo $lang->project->future;?></label>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->dateRange;?></th>
<td>
<div class='input-group'>
<?php echo html::input('begin', $project->begin, "class='form-control form-date' placeholder='" . $lang->project->begin . "' required");?>
<span class='input-group-addon'><?php echo $lang->project->to;?></span>
<?php
$disabledEnd = $project->end == LONG_TIME ? 'disabled' : '';
$end = $project->end == LONG_TIME ? $lang->project->PRJLongTime : $project->end;
echo html::input('end', $end, "class='form-control form-date' $disabledEnd placeholder='" . $lang->project->end . "' required");
?>
</div>
</td>
<?php $endValue = $project->end == LONG_TIME ? 999 : (strtotime($project->end) - strtotime($project->begin)) / 3600 / 24 + 1;?>
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , $endValue, "onclick='computeEndDate(this.value)'");?></td>
</tr>
<tr>
<th><?php echo $lang->project->realBegan;?></th>
<td><?php echo html::input('realBegan', $project->realBegan, "class='form-control form-date'");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->project->PGMDesc;?></th>
<td colspan='3'>
<?php echo html::textarea('desc', $project->desc, "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?>
</td>
</tr>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
</tr>
<tr class="<?php if($project->acl == 'open') echo 'hidden';?>" id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td><?php echo html::select('whitelist[]', $users, $project->whitelist, 'class="form-control chosen" multiple');?></td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan='4' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</table>
</form>
</div>
</div>
<div id='PGMAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->PGMAclList, $project->acl == 'project' ? 'private' : 'open', "onclick='setWhite(this.value);'", 'block'));?>
</div>
<div id='subPGMAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->subPGMAclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?>
</div>
<?php include '../../common/view/footer.html.php';?>
-2
View File
@@ -1,2 +0,0 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/footer.html.php';?>
@@ -1,109 +0,0 @@
<?php include '../../common/view/header.html.php';?>
<?php js::set('projectID', $project->id);?>
<?php js::set('roles', $roles);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<span class='btn btn-link btn-active-text'>
<?php echo html::a($this->createLink('project', 'managemembers', "projectID={$project->id}"), "<span class='text'> {$lang->project->manageMembers}</span>");?>
</span>
<div class='input-group space w-200px'>
<span class='input-group-addon'><?php echo $lang->project->selectDept?></span>
<?php echo html::select('dept', $depts, $dept, "class='form-control chosen' onchange='setDeptUsers(this)' data-placeholder='{$lang->project->selectDeptTitle}'");?>
</div>
</div>
</div>
<div id='mainContent' class='main-content'>
<form class='main-form' method='post' id='teamForm' target='hiddenwin'>
<table class='table table-form'>
<thead>
<tr class='text-center'>
<th><?php echo $lang->team->account;?></th>
<th><?php echo $lang->team->role;?></th>
<th class='w-100px'><?php echo $lang->team->days;?></th>
<th class='w-100px'><?php echo $lang->team->hours;?></th>
<th class='w-110px'><?php echo $lang->team->limited;?></th>
<th class="w-90px"> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php $i = 0; $memberCount = 0;?>
<?php foreach($currentMembers as $member):?>
<?php if(!isset($users[$member->account])) continue;?>
<?php unset($users[$member->account]);?>
<tr>
<td><input type='text' name='realnames[]' id='account<?php echo $i;?>' value='<?php echo $member->realname;?>' readonly class='form-control' /></td>
<td><input type='text' name='roles[]' id='role<?php echo $i;?>' value='<?php echo $member->role;?>' class='form-control' /></td>
<td><input type='text' name='days[] ' id='days<?php echo $i;?>' value='<?php echo $member->days;?>' class='form-control' /></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo $i;?>' value='<?php echo $member->hours;?>' class='form-control' />
<input type='hidden' name='accounts[]' value='<?php echo $member->account;?>' />
</td>
<td><?php echo html::radio("limited[$i]", $lang->team->limitedList, $member->limited);?></td>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
<?php $i ++; $memberCount ++;?>
<?php endforeach;?>
<?php foreach($deptUsers as $deptAccount => $userName):?>
<?php if(!isset($users[$deptAccount])) continue;?>
<tr class='addedItem'>
<td><?php echo html::select("accounts[]", $users, $deptAccount, "class='form-control chosen' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo $i;?>' class='form-control' value='<?php echo $roles[$deptAccount]?>'/></td>
<td><input type='text' name='days[]' id='days<?php echo $i;?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo $i;?>' class='form-control' value='<?php echo $config->project->defaultWorkhours?>' />
</td>
<td><?php echo html::radio("limited[$i]", $lang->team->limitedList, 'no');?></td>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
<?php unset($users[$deptAccount]);?>
<?php $i ++; $memberCount ++;?>
<?php endforeach;?>
<?php for($j = 0; $j < 5; $j ++):?>
<tr class='addedItem'>
<td><?php echo html::select("accounts[]", $users, '', "class='form-control chosen' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo ($i);?>' class='form-control' /></td>
<td><input type='text' name='days[]' id='days<?php echo ($i);?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo ($i);?>' class='form-control' value='<?php echo $config->project->defaultWorkhours?>' />
</td>
<td><?php echo html::radio("limited[$i]", $lang->team->limitedList, 'no');?></td>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
<?php $i ++; $memberCount ++;?>
<?php endfor;?>
</tbody>
<tfoot><tr><td colspan='6' class='text-center form-actions'><?php echo html::submitButton() . ' ' . html::backButton(); ?></td></tr></tfoot>
</table>
<?php js::set('i', $i);?>
</form>
</div>
<div>
<?php $i = '%i%';?>
<table class='hidden'>
<tr id='addItem' class='hidden'>
<td><?php echo html::select("accounts[]", $users, '', "class='form-control' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo ($i);?>' class='form-control' /></td>
<td><input type='text' name='days[]' id='days<?php echo ($i);?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo ($i);?>' class='form-control' value='<?php echo $config->project->defaultWorkhours?>' />
</td>
<td><?php echo html::radio("limited[$i]", $lang->team->limitedList, 'no');?></td>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
</table>
</div>
<?php include '../../common/view/footer.html.php';?>
-136
View File
@@ -1,136 +0,0 @@
<?php
/**
* The html product list file of pgmproduct method of project 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 Yangyang Shi <shiyangyang@cnezsoft.com>
* @package ZenTaoPMS
* @version $Id
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/sortable.html.php';?>
<div id="mainMenu" class="clearfix">
<?php if(!isonlybody()):?>
<div class="btn-toolbar pull-left">
<?php foreach($lang->product->featureBar['all'] as $key => $label):?>
<?php $active = $key == $browseType ? 'btn-active-text' : '';?>
<?php if($key == $browseType) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
<?php echo html::a(inlink("pgmproduct", "projectID=$project->id&browseType=$key&orderBy=$orderBy"), "<span class='text'>{$label}</span>", '', "class='btn btn-link $active'");?>
<?php endforeach;?>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('product', 'create', "projectID=$project->id", '<i class="icon icon-plus"></i>' . $lang->product->create, '', 'class="btn btn-primary"');?>
</div>
<?php endif;?>
</div>
<div id="mainContent" class="main-row fade">
<?php if(empty($products)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->product->noProduct;?></span></p>
</div>
<?php else:?>
<div class="main-col">
<form class="main-table table-product" data-ride="table" id="productListForm" method="post" action='<?php echo $this->createLink('product', 'batchEdit', "projectID=$project->id");?>'>
<?php $canOrder = common::hasPriv('product', 'updateOrder');?>
<?php $canBatchEdit = common::hasPriv('product', 'batchEdit');?>
<table id="productList" class="table has-sort-head table-bordered table-fixed">
<?php $vars = "projectID=$project->id&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<thead>
<tr class="text-center">
<th class='c-id text-left' rowspan='2'>
<?php if($canBatchEdit):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll;?>">
<label></label>
</div>
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th rowspan="2"><?php common::printOrderLink('name', $orderBy, $vars, $lang->product->name);?></th>
<th class="w-300px" colspan="4"><?php echo $lang->story->requirement;?></th>
<th class="w-300px" colspan="4"><?php echo $lang->story->story;?></th>
<th class="w-150px" colspan="2"><?php echo $lang->bug->common;?></th>
<th class="w-80px" rowspan="2"><?php echo $lang->product->release;?></th>
<th class="w-80px" rowspan="2"><?php echo $lang->product->plan;?></th>
<th class='c-actions w-60px' rowspan="2"><?php echo $lang->actions;?></th>
</tr>
<tr class="text-center">
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->activate;?></th>
<th><?php echo $lang->story->close;?></th>
<th><?php echo $lang->story->draft;?></th>
<th><?php echo $lang->story->completeRate;?></th>
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->activate;?></th>
<th><?php echo $lang->story->close;?></th>
<th><?php echo $lang->story->draft;?></th>
<th><?php echo $lang->story->completeRate;?></th>
<th style="border-left: 1px solid #ddd;"><?php echo $lang->bug->activate;?></th>
<th><?php echo $lang->close;?></th>
</tr>
</thead>
<tbody class="sortable" id="productTableList">
<?php foreach($products as $product):?>
<?php
$totalStories = $product->stories['active'] + $product->stories['closed'] + $product->stories['draft'] + $product->stories['changed'];
$totalRequirements = $product->requirements['active'] + $product->requirements['closed'] + $product->requirements['draft'] + $product->requirements['changed'];
?>
<tr class="text-center" data-id='<?php echo $product->id ?>' data-order='<?php echo $product->code;?>'>
<td class='c-id text-left'>
<?php if($canBatchEdit):?>
<?php echo html::checkbox('productIDList', array($product->id => sprintf('%03d', $product->id)));?>
<?php else:?>
<?php printf('%03d', $product->id);?>
<?php endif;?>
</td>
<td class="c-name" title='<?php echo $product->name?>'><?php echo html::a($this->createLink('product', 'browse', 'product=' . $product->id), $product->name);?></td>
<td><?php echo $product->requirements['active'];?></td>
<td><?php echo $product->requirements['closed'];?></td>
<td><?php echo $product->requirements['draft'];?></td>
<td><?php echo $totalRequirements == 0 ? 0 : round($product->requirements['closed'] / $totalRequirements, 3) * 100;?>%</td>
<td><?php echo $product->stories['active'];?></td>
<td><?php echo $product->stories['closed'];?></td>
<td><?php echo $product->stories['draft'];?></td>
<td><?php echo $totalStories == 0 ? 0 : round($product->stories['closed'] / $totalStories, 3) * 100;?>%</td>
<td><?php echo $product->unResolved;?></td>
<td><?php echo $product->closedBugs;?></td>
<td><?php echo $product->releases;?></td>
<td><?php echo $product->plans;?></td>
<td class='c-actions'>
<?php common::printIcon('product', 'edit', "product=$product->id&action=edit&extra=&projectID=$project->id", $product, 'list', 'edit');?>
<?php if($canOrder):?>
<span class='c-actions sort-handler'><i class="icon icon-move"></i></span>
<?php endif;?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if($products):?>
<div class="table-footer">
<?php if($canBatchEdit):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->edit, '', 'btn');?>
</div>
<?php endif;?>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
</form>
</div>
<?php endif;?>
</div>
<?php js::set('orderBy', $orderBy)?>
<?php js::set('projectID', $project->id)?>
<script>
$(function()
{
$('#productTableList').on('sort.sortable', function(e, data)
{
var list = '';
for(i = 0; i < data.list.length; i++) list += $(data.list[i].item).attr('data-id') + ',';
$.post(createLink('product', 'updateOrder'), {'products' : list, 'orderBy' : orderBy});
});
});
</script>
<?php include '../../common/view/footer.html.php';?>
-103
View File
@@ -1,103 +0,0 @@
<?php
/**
* The pgmproject view file of project 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 project
* @version $Id: pgmproject.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php
js::set('projectID', $projectID);
js::set('browseType', $browseType);
?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolBar pull-left">
<?php foreach($lang->project->featureBar as $key => $label):?>
<?php $active = $browseType == $key ? 'btn-active-text' : '';?>
<?php $label = "<span class='text'>$label</span>";?>
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
<?php echo html::a(inlink('PGMProject', "projectID=$projectID&browseType=$key"), $label, '', "class='btn btn-link $active'");?>
<?php endforeach;?>
<?php echo html::checkbox('PRJMine', array('1' => $lang->project->mine), '', $this->cookie->PRJMine ? 'checked=checked' : '');?>
</div>
<div class="btn-toolbar pull-right">
<?php if(isset($this->config->maxVersion)):?>
<?php common::printLink('project', 'createGuide', "projectID=$projectID&from=PGM", '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?>
<?php elseif($this->config->systemMode == 'new'):?>
<?php common::printLink('project', 'prjcreate', "mode=scrum&projectID=$projectID&from=PGM", '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-primary"');?>
<?php else:?>
<?php common::printLink('project', 'create', '', '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-primary"');?>
<?php endif;?>
</div>
</div>
<div id='mainContent' class="main-row fade">
<div class="main-col">
<?php if(empty($projectStats)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->project->noPRJ;?></span>
<?php common::printLink('project', 'createGuide', "projectID=$projectID", '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-info btn-wide " data-toggle="modal" data-target="#guideDialog"');?>
</p>
</div>
<?php else:?>
<form class='main-table' id='projectsForm' method='post' data-ride="table">
<?php
$vars = "projectID=$projectID&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";
$setting = $this->datatable->getSetting('project');
?>
<table class='table has-sort-head'>
<?php $canBatchEdit = common::hasPriv('project', 'PRJBatchEdit');?>
<thead>
<tr>
<?php
foreach($setting as $value)
{
if($value->id == 'PRJStatus' and $browseType !== 'all') $value->show = false;
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
}
?>
</tr>
</thead>
<tbody class="sortable" id='projectTableList'>
<?php foreach($projectStats as $project):?>
<tr data-id="<?php echo $project->id;?>">
<?php $project->from = 'pgmproject';?>
<?php foreach($setting as $value) $this->project->printCell($value, $project, $users, $projectID);?>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($canBatchEdit):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<?php endif;?>
<div class="table-actions btn-toolbar">
<?php
if($canBatchEdit)
{
$actionLink = $this->createLink('project', 'PRJBatchEdit', "from=pgmproject&projectID=$projectID");
$misc = "data-form-action='$actionLink'";
echo html::commonButton($lang->edit, $misc);
}
?>
</div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<?php endif;?>
</div>
</div>
<script>
$('#PRJMine1').click(function()
{
var PRJMine = $(this).is(':checked') ? 1 : 0;
$.cookie('PRJMine', PRJMine, {expires:config.cookieLife, path:config.webRoot});
window.location.reload();
});
</script>
<?php include '../../common/view/footer.html.php';?>
@@ -1,86 +0,0 @@
<?php
/**
* The stakeholder view of project 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 product
* @version $Id: browse.html.php 5096 2013-07-11 07:02:43Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('confirmDelete', $lang->project->confirmDelete);?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a($this->createLink('project', 'pgmstakeholder', "projectID=$projectID"), '<span class="text">' . $lang->project->PGMStakeholder . '</span>', '', 'class="btn btn-link btn-active-text"');?>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('stakeholder', 'create', "projectID=$projectID", "<i class='icon icon-plus'></i>" . $lang->project->createStakeholder, '', "class='btn btn-primary'");?>
</div>
</div>
<div id='mainContent' class='main-row fade'>
<div class='main-col'>
<?php if(!empty($stakeholders)):?>
<form class='main-table table-user' data-ride='table' action='' method='post' id='userListForm'>
<table class='table has-sort-head' id='userList'>
<thead>
<tr>
<th class='c-id'>
<div class='checkbox-primary check-all' title="<?php echo $this->lang->selectAll;?>"><label></label></div>
<?php echo $lang->idAB;?>
</th>
<th><?php echo $lang->user->realname;?></th>
<th class="w-100px"><?php echo $lang->project->stakeholderType;?></th>
<th class="w-120px"><?php echo $lang->user->role;?></th>
<th class="w-120px"><?php echo $lang->user->phone;?></th>
<th class="w-120px"><?php echo $lang->user->qq;?></th>
<th class="w-120px"><?php echo $lang->user->weixin;?></th>
<th class="w-200px"><?php echo $lang->user->email;?></th>
<th class='c-actions w-60px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($stakeholders as $stakeholder):?>
<tr>
<td class='c-id'>
<?php echo html::checkbox('stakeholderIDList', array($stakeholder->id => ''));?>
<?php printf('%03d', $stakeholder->id);?>
</td>
<?php $isKey = $stakeholder->key ? " <i class='icon icon-star-empty'></i>" : '';?>
<?php $title = $stakeholder->key ? $lang->project->isStakeholderKey : '';?>
<td title="<?php echo $title;?>"><?php echo $stakeholder->realname . $isKey;?></td>
<td title='<?php echo zget($lang->project->stakeholderTypeList, $stakeholder->type, '');?>'><?php echo zget($lang->project->stakeholderTypeList, $stakeholder->type, '');?></td>
<td><?php echo zget($lang->user->roleList, $stakeholder->role, '');?></td>
<td title="<?php echo $stakeholder->phone;?>"><?php echo $stakeholder->phone;?></td>
<td title="<?php echo $stakeholder->qq;?>"><?php echo $stakeholder->qq;?></td>
<td title="<?php echo $stakeholder->weixin;?>"><?php echo $stakeholder->weixin;?></td>
<td title="<?php echo $stakeholder->email;?>"><?php echo $stakeholder->email;?></td>
<td class='c-actions'>
<?php
$deleteClass = common::hasPriv('project', 'unlinkStakeholder') ? 'btn' : 'btn disabled';
echo html::a($this->createLink('project', 'unlinkStakeholder', "id=$stakeholder->id&projectID=$projectID&confirm=no"), '<i class="icon-unlink"></i>', 'hiddenwin', "title='{$lang->project->unlinkStakeholder}' class='{$deleteClass}'");
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if($stakeholders):?>
<div class='table-footer'>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions">
<?php $actionLink = $this->createLink('project', 'batchUnlinkStakeholders', "projectID=$projectID");?>
<?php echo html::commonButton($lang->project->unlink, "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");?>
</div>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
</form>
<?php else:?>
<div class='table-empty-tip'><?php echo $lang->noData;?></div>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-50
View File
@@ -1,50 +0,0 @@
<?php
/**
* The prjstart view file of project 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 project
* @version $Id: prjstart.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
<?php if(!isonlybody()):?>
<small><?php echo $lang->arrow . $lang->project->start;?></small>
<?php endif;?>
</h2>
</div>
<form class='load-indicator main-form' method='post' target='hiddenwin'>
<table class='table table-form'>
<tbody>
<tr>
<th class='w-100px'><?php echo $lang->project->realBegan;?></th>
<td><?php echo html::input('realBegan', helper::today(), "class='form-control form-date'");?></td>
<td></td>
</tr>
<tr>
<th class='w-40px'><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton($lang->project->start);?>
</td>
</tr>
</tbody>
</table>
</form>
<hr class='small' />
<div class='main'>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-88
View File
@@ -1,88 +0,0 @@
<?php
/**
* The prjbatchedit view file of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Shujie Tian <tianshujie@easycorp.ltd>
* @package project
* @version $Id: prjbatchedit.html.php 4769 2021-02-020 11:13:21Z $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('weekend', $config->project->weekend);?>
<?php js::set('linkedProjectsTip', $lang->project->linkedProjectsTip);?>
<?php js::set('changeProgram', $lang->project->changeProgram);?>
<?php $requiredFields = $config->project->PRJEdit->requiredFields;?>
<div id="mainContent" class="main-content">
<div class="main-header">
<h2><?php echo $lang->project->PRJBatchEdit;?></h2>
</div>
<form method='post' class='load-indicator main-form' enctype='multipart/form-data' target='hiddenwin' id="batchEditForm">
<table class="table table-form">
<thead>
<tr>
<th class='w-40px'><?php echo $lang->idAB;?></th>
<th class='w-200px'><?php echo $lang->project->PGMParent;?></th>
<th class='c-name required'><?php echo $lang->project->PRJName;?></th>
<th class="w-150px <?php echo strpos($requiredFields, 'PM') !== false ? 'required' : '';?>"> <?php echo $lang->project->PRJPM;?></th>
<th class='w-120px required'><?php echo $lang->project->begin;?></th>
<th class='w-120px required'><?php echo $lang->project->end;?></th>
<th class='w-250px'><?php echo $lang->project->acl;?></th>
</tr>
</thead>
<tbody>
<?php foreach($projects as $projectID => $project):?>
<?php $aclList = $project->parent ? $lang->project->PGMPRJAcls : $lang->project->PRJAcls;?>
<tr>
<td><?php echo sprintf('%03d', $projectID) . html::hidden("projectIdList[$projectID]", $projectID);?></td>
<td><?php echo html::select("parents[$projectID]", $projectList, $project->parent, "class='form-control chosen' data-id='$projectID' data-name='{$project->name}' data-parent='{$project->parent}'");?></td>
<td title='<?php echo $project->name;?>'><?php echo html::input("names[$projectID]", $project->name, "class='form-control'");?></td>
<td><?php echo html::select("PMs[$projectID]", $PMUsers, $project->PM, "class='form-control chosen'");?></td>
<td>
<?php echo html::input("begins[$projectID]", $project->begin, "class='form-control form-date' onchange='computeWorkDays(this.id);' placeholder='" . $lang->project->begin . "'");?>
</td>
<td>
<?php
$disabledEnd = $project->end == LONG_TIME ? 'disabled' : '';
$end = $project->end == LONG_TIME ? $lang->project->PRJLongTime : $project->end;
echo html::input("ends[$projectID]", $end, "class='form-control form-date' $disabledEnd onchange='computeWorkDays(this.id);' placeholder='" . $lang->project->end . "'");
echo html::hidden("dayses[$projectID]", $project->days);
?>
</td>
<td><?php echo nl2br(html::radio("acls[$projectID]", $aclList, $project->acl));?></td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan="4" class="text-center form-actions">
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</tfoot>
</table>
</div>
<div class="modal fade" id="promptBox">
<div class="modal-dialog mw-600px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body">
<table class='table table-form' id='promptTable'>
<thead>
<tr>
<th class='text-left'><?php echo $lang->project->multiLinkedProductsTip;?></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-122
View File
@@ -1,122 +0,0 @@
<?php
/**
* The prjbrowse view file of project 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 project
* @version $Id: prjbrowse.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php
js::set('orderBy', $orderBy);
js::set('projectID', $projectID);
js::set('browseType', $browseType);
?>
<div id="mainMenu" class="clearfix">
<?php if($this->config->systemMode == 'new'):?>
<div id="sidebarHeader">
<div class="title">
<?php echo empty($project) ? $lang->project->project : $project->name;?>
<?php if($projectID) echo html::a(inLink('PRJBrowse', 'projectID=0'), "<i class='icon icon-sm icon-close'></i>", '', 'class="text-muted"');?>
</div>
</div>
<?php endif;?>
<div class="btn-toolBar pull-left">
<?php foreach($lang->project->featureBar as $key => $label):?>
<?php $active = $browseType == $key ? 'btn-active-text' : '';?>
<?php $label = "<span class='text'>$label</span>";?>
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
<?php echo html::a(inlink('PRJBrowse', "projectID=$projectID&browseType=$key"), $label, '', "class='btn btn-link $active'");?>
<?php endforeach;?>
<?php echo html::checkbox('PRJMine', array('1' => $lang->project->mine), '', $this->cookie->PRJMine ? 'checked=checked' : '');?>
</div>
<div class="btn-toolbar pull-right">
<?php if(isset($this->config->maxVersion)):?>
<?php common::printLink('project', 'createGuide', "projectID=$projectID", '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?>
<?php elseif($this->config->systemMode == 'new'):?>
<?php common::printLink('project', 'prjcreate', 'mode=scrum', '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-primary"');?>
<?php else:?>
<?php common::printLink('project', 'create', '', '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-primary"');?>
<?php endif;?>
</div>
</div>
<div id='mainContent' class="main-row fade">
<?php if($this->config->systemMode == 'new'):?>
<div id="sidebar" class="side-col">
<div class="sidebar-toggle"><i class="icon icon-angle-left"></i></div>
<div class="cell">
<?php echo $PRJTree;?>
<div class="text-center">
<?php common::printLink('project', 'PRJProgramTitle', '', $lang->project->PRJModuleSetting, '', "class='btn btn-info btn-wide iframe'", true, true);?>
</div>
</div>
</div>
<?php endif;?>
<div class="main-col">
<?php if(empty($projectStats)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->project->noPRJ;?></span>
<?php if($this->config->systemMode == 'new'):?>
<?php common::printLink('project', 'createGuide', "projectID=$projectID", '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-info btn-wide " data-toggle="modal" data-target="#guideDialog"');?>
<?php else:?>
<?php common::printLink('project', 'create', '', '<i class="icon icon-plus"></i>' . $lang->project->PRJCreate, '', 'class="btn btn-info btn-wide"');?>
<?php endif;?>
</p>
</div>
<?php else:?>
<form class='main-table' id='PRJForm' method='post' data-ride="table">
<div class="table-header fixed-right">
<nav class="btn-toolbar pull-right"></nav>
</div>
<?php
$vars = "projectID=$projectID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";
$setting = $this->datatable->getSetting('project');
?>
<table class='table has-sort-head'>
<?php $canBatchEdit = $this->config->systemMode == 'new' ? common::hasPriv('project', 'PRJBatchEdit') : common::hasPriv('project', 'batchEdit');?>
<thead>
<tr>
<?php
foreach($setting as $value)
{
if($value->id == 'PRJStatus' and $browseType !== 'all') $value->show = false;
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
}
?>
</tr>
</thead>
<tbody class="sortable" id='projectTableList'>
<?php foreach($projectStats as $project):?>
<?php $project->from = 'PRJ';?>
<tr data-id="<?php echo $project->id;?>">
<?php foreach($setting as $value) $this->project->printCell($value, $project, $users, $projectID);?>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($canBatchEdit):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<?php endif;?>
<div class="table-actions btn-toolbar">
<?php
if($canBatchEdit)
{
$actionLink = $this->config->systemMode == 'new' ? $this->createLink('project', 'PRJBatchEdit', 'from=prjbrowse') : $this->createLink('project', 'batchEdit');
$misc = "data-form-action='$actionLink'";
echo html::commonButton($lang->edit, $misc);
}
?>
</div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-205
View File
@@ -1,205 +0,0 @@
<?php
/**
* The prjcreate view file of project 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 project
* @version $Id: prjcreate.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'misc/date.js');?>
<?php js::set('model', $model);?>
<?php js::set('projectID', $projectID);?>
<?php js::set('copyProjectID', $copyProjectID);?>
<?php js::set('from', $from);?>
<?php js::set('weekend', $config->project->weekend);?>
<?php js::set('errorSameProducts', $lang->project->errorSameProducts);?>
<?php js::set('longTime', $lang->project->PRJLongTime);?>
<?php $requiredFields = $config->project->PRJCreate->requiredFields;?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->project->PRJCreate . ' - ' . zget($lang->project->modelList, $model, '');?></h2>
<div class="pull-right btn-toolbar">
<button type='button' class='btn btn-link' data-toggle='modal' data-target='#copyProjectModal'><?php echo html::icon($lang->icons['copy'], 'muted') . ' ' . $lang->project->PRJCopy;?></button>
</div>
</div>
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->project->PGMParent;?></th>
<td><?php echo html::select('parent', $projectList, $projectID, "class='form-control chosen' onchange='setParentProgram(this.value)'");?></td>
<td>
<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->project->PGMTips;?>"></icon>
</td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->project->PRJName;?></th>
<td class="col-main"><?php echo html::input('name', $name, "class='form-control' required");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->project->PRJPM;?></th>
<td><?php echo html::select('PM', $pmUsers, '', "class='form-control chosen'" . (strpos($requiredFields, 'PM') !== false ? ' required' : ''));?></td>
</tr>
<tr>
<th><?php echo $lang->project->PRJBudget;?></th>
<td>
<div class='input-group'>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->project->PGMParentBudget . zget($lang->project->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
<?php echo html::input('budget', '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . $placeholder);?>
<?php if($parentProgram):?>
<span class='input-group-addon'><?php echo zget($budgetUnitList, $parentProgram->budgetUnit);?></span>
<?php else:?>
<span class='input-group-addon'></span>
<?php echo html::select('budgetUnit', $budgetUnitList, $config->project->defaultCurrency, "class='form-control'");?>
<?php endif;?>
</div>
</td>
<td>
<div class='checkbox-primary'>
<input type='checkbox' id='future' name='future' value='1' />
<label for='future'><?php echo $lang->project->future;?></label>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->dateRange;?></th>
<td>
<div class='input-group'>
<?php echo html::input('begin', date('Y-m-d'), "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->project->begin . "' required");?>
<span class='input-group-addon'><?php echo $lang->project->to;?></span>
<?php echo html::input('end', '', "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->project->end . "' required");?>
</div>
</td>
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , '', "onclick='computeEndDate(this.value)'");?></td>
</tr>
<?php if($model == 'scrum'):?>
<tr>
<th><?php echo $lang->project->days;?></th>
<td>
<div class='input-group'>
<?php echo html::input('days', '', "class='form-control'");?>
<span class='input-group-addon'><?php echo $lang->project->day;?></span>
</div>
</td><td></td><td></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->project->manageProducts;?></th>
<td class='text-left' id='productsBox' colspan="3">
<div class='row'>
<?php $i = 0;?>
<?php foreach($products as $product):?>
<div class="col-sm-4" style="margin-bottom: 10px; padding-right: 6px;">
<?php $hasBranch = $product->type != 'normal' and isset($branchGroups[$product->id]);?>
<div class="input-group<?php if($hasBranch) echo ' has-branch';?>">
<?php echo html::select("products[$i]", $allProducts, $product->id, "class='form-control chosen' onchange='loadBranches(this)' data-last='" . $product->id . "'");?>
<span class='input-group-addon fix-border'></span>
<?php if($hasBranch) echo html::select("branch[$i]", $branchGroups[$product->id], $product->branch, "class='form-control chosen' onchange=\"loadPlans('#products{$i}', this.value)\"");?>
</div>
</div>
<?php $i++;?>
<?php endforeach;?>
<div class='col-sm-4 <?php if($projectID) echo 'required';?>' style="padding-right: 6px;">
<div class='input-group'>
<?php echo html::select("products[$i]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");?>
<span class='input-group-addon'><?php echo html::checkBox('newProduct', $lang->project->addProduct, '', "onchange=addNewProduct(this);");?></span>
</div>
</div>
</div>
</td>
</tr>
<tr class='hidden'>
<th><?php echo $lang->product->name;?></th>
<td><?php echo html::input('productName', '', "class='form-control' required");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->project->linkPlan;?></th>
<td colspan="3" id="plansBox">
<div class='row'>
<?php if($copyProjectID):?>
<?php $i = 0;?>
<?php foreach($products as $product):?>
<?php $plans = zget($productPlans, $product->id, array(0 => ''));?>
<div class="col-sm-4" id="plan<?php echo $i;?>"><?php echo html::select("plans[" . $product->id . "]", $plans, '', "class='form-control chosen'");?></div>
<?php $i++;?>
<?php endforeach;?>
<?php else:?>
<div class="col-sm-4" id="plan0" style="padding-right: 6px;"><?php echo html::select("plans[]", '', '', "class='form-control chosen'");?></div>
<?php endif;?>
</div>
</td>
</tr>
<?php $this->printExtendFields('', 'table');?>
<tr>
<th><?php echo $lang->project->PRJDesc;?></th>
<td colspan='3'>
<?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?>
</td>
</tr>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $lang->project->PRJAclList, $acl, "onclick='setWhite(this.value);'", 'block'));?></td>
</tr>
<tr class="hidden" id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td><?php echo html::select('whitelist[]', $users, '', 'class="form-control chosen" multiple');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->project->auth;?></th>
<td colspan='3'><?php echo html::radio('auth', $lang->project->PRJAuthList, $auth, '', 'block');?></td>
</tr>
<tr>
<td colspan='4' class='text-center form-actions'>
<?php
echo html::hidden('model', $model);
echo html::submitButton();
echo html::backButton();
?>
</td>
</tr>
</table>
</form>
</div>
</div>
<div class='modal fade modal-scroll-inside' id='copyProjectModal'>
<div class='modal-dialog mw-900px'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal'><i class="icon icon-close"></i></button>
<h4 class='modal-title' id='myModalLabel'>
<?php echo $lang->project->copyTitle;?>
<?php echo html::input('projectName', '', "class='form-control' placeholder={$lang->project->searchByName}");?>
</h4>
</div>
<div class='modal-body'>
<?php if(empty($copyProjects)):?>
<div class='alert with-icon'>
<i class='icon-exclamation-sign'></i>
<div class='content'><?php echo $lang->project->copyNoProject;?></div>
</div>
<?php else:?>
<div id='copyProjects' class='row'>
<?php foreach ($copyProjects as $id => $name):?>
<?php $active = ($copyProjectID == $id) ? ' active' : '';?>
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='<?php echo $id;?>' class='nobr <?php echo $active;?>'><?php echo html::icon($lang->icons['project'], 'text-muted') . ' ' . $name;?></a></div>
<?php endforeach;?>
</div>
<?php endif;?>
</div>
</div>
</div>
<div id='PRJAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->PRJAclList, $acl, "onclick='setWhite(this.value);'", 'block'));?>
</div>
<div id='PGMAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->PGMPRJAclList, $acl, "onclick='setWhite(this.value);'", 'block'));?>
</div>
<?php include '../../common/view/footer.html.php';?>
@@ -1,50 +0,0 @@
<?php
/**
* The prjcreateguide view file of project 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 project
* @version $Id: prjcreateguide.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
<div class="modal fade" id='guideDialog'>
<div class="modal-dialog">
<div class='modal-content'>
<div class='modal-body'>
<h2 class='text-center'><?php echo $lang->project->chooseProgramType; ?></h2>
<div class='row'>
<div class='col-xs-6'>
<div class='project-type text-center'>
<img class='project-type-img' data-type='scrum' src='<?php echo $config->webRoot . 'theme/default/images/main/scrum.png'?>'>
<h3><?php echo $lang->project->scrum; ?></h3>
<p><?php echo $lang->project->scrumTitle; ?></p>
</div>
</div>
<div class='col-xs-6'>
<div class='project-type text-center'>
<img class='project-type-img' data-type='waterfall' src='<?php echo $config->webRoot . 'theme/default/images/main/waterfall.png'?>'>
<h3><?php echo $lang->project->waterfall; ?></h3>
<p><?php echo $lang->project->waterfallTitle; ?></p>
</div>
</div>
</div>
<div class='modal-footer text-center'>
<a class='btn btn-primary btn-wide disabled' id='guideBtn'><?php echo $lang->project->nextStep; ?></a>
<button type='button' class='btn btn-default btn-wide' data-dismiss='modal'><?php echo $lang->cancel; ?></button>
</div>
</div>
</div>
</div>
</div>
<script>
$('#guideDialog').on('click', '.project-type-img', function()
{
var $this = $(this);
$('#guideDialog .project-type.active').removeClass('active');
$this.parent().addClass('active');
$('#guideBtn').removeClass('disabled').attr('href', createLink('project', 'PRJCreate', 'template=' + $this.data('type') + "&projectID=" + projectID));
});
</script>
-197
View File
@@ -1,197 +0,0 @@
<?php
/**
* The prjedit view file of project 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 project
* @version $Id
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'misc/date.js');?>
<?php js::set('weekend', $config->project->weekend);?>
<?php js::set('errorSameProducts', $lang->project->errorSameProducts);?>
<?php js::set('oldParent', $project->parent);?>
<?php js::set('projectID', $project->id);?>
<?php js::set('longTime', $lang->project->PRJLongTime);?>
<?php js::set('from', $from);?>
<?php js::set('unmodifiableProducts', $unmodifiableProducts)?>
<?php js::set('tip', $lang->project->notAllowRemoveProducts);?>
<?php js::set('linkedProjectsTip', $lang->project->linkedProjectsTip);?>
<?php $aclList = $project->parent ? $lang->project->PGMPRJAclList : $lang->project->PRJAclList;?>
<?php $requiredFields = $config->project->PRJEdit->requiredFields;?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->project->PRJEdit;?></h2>
</div>
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->project->PGMParent;?></th>
<td><?php echo html::select('parent', $projectList, $project->parent, "class='form-control chosen'");?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->project->PRJName;?></th>
<td class="col-main"><?php echo html::input('name', $project->name, "class='form-control' required");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->project->PRJPM;?></th>
<td><?php echo html::select('PM', $PMUsers, $project->PM, "class='form-control chosen'" . (strpos($requiredFields, 'PM') !== false ? ' required' : ''));?></td>
</tr>
<tr>
<th><?php echo $lang->project->PRJBudget;?></th>
<td>
<div class='input-group'>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->project->PGMParentBudget . zget($lang->project->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
<?php echo html::input('budget', $project->budget != 0 ? $project->budget : '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . ($project->budget == 0 ? 'disabled ' : '') . $placeholder);?>
<?php if($parentProgram):?>
<span class='input-group-addon'><?php echo zget($budgetUnitList, $parentProgram->budgetUnit);?></span>
<?php else:?>
<span class='input-group-addon'></span>
<?php echo html::select('budgetUnit', $budgetUnitList, $project->budgetUnit, "class='form-control'");?>
<?php endif;?>
</div>
</td>
<td>
<div class='checkbox-primary'>
<input type='checkbox' id='future' name='future' value='1' <?php if($project->budget == 0) echo 'checked';?> />
<label for='future'><?php echo $lang->project->future;?></label>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->dateRange;?></th>
<td>
<div class='input-group'>
<?php echo html::input('begin', $project->begin, "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->project->begin . "' required");?>
<span class='input-group-addon'><?php echo $lang->project->to;?></span>
<?php
$disabledEnd = $project->end == LONG_TIME ? 'disabled' : '';
$end = $project->end == LONG_TIME ? $lang->project->PRJLongTime : $project->end;
echo html::input('end', $end, "class='form-control form-date' onchange='computeWorkDays();' $disabledEnd placeholder='" . $lang->project->end . "' required");
?>
</div>
</td>
<?php $deltaValue = $project->end == LONG_TIME ? 999 : (strtotime($project->end) - strtotime($project->begin)) / 3600 / 24 + 1;?>
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , $deltaValue, "onclick='computeEndDate(this.value)'");?></td>
</tr>
<?php if($project->model == 'scrum'):?>
<tr>
<th><?php echo $lang->project->days;?></th>
<td>
<div class='input-group'>
<?php echo html::input('days', $project->days, "class='form-control'");?>
<span class='input-group-addon'><?php echo $lang->project->day;?></span>
</div>
</td>
<td></td>
<td></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->project->manageProducts;?></th>
<td class='text-left' id='productsBox' colspan="3">
<div class='row'>
<?php $i = 0;?>
<?php foreach($linkedProducts as $product):?>
<div class='col-sm-4' style="padding-right: 6px;">
<?php $hasBranch = $product->type != 'normal' and isset($branchGroups[$product->id]);?>
<div class="input-group<?php if($hasBranch) echo ' has-branch';?>">
<?php echo html::select("products[$i]", $allProducts, $product->id, "class='form-control chosen' data-placeholder={$lang->project->errorNoProducts} onchange='loadBranches(this)' data-last='" . $product->id . "'");?>
<span class='input-group-addon fix-border'></span>
<?php if($hasBranch) echo html::select("branch[$i]", $branchGroups[$product->id], $product->branch, "class='form-control chosen' onchange=\"loadPlans('#products{$i}', this.value)\"");?>
</div>
</div>
<?php if(in_array($product->id, $unmodifiableProducts)) echo html::hidden("products[$i]", $product->id);?>
<?php $i++;?>
<?php endforeach;?>
<div class='col-sm-4 <?php if($projectID) echo 'required';?>' style="padding-right: 6px;">
<div class='input-group'>
<?php echo html::select("products[$i]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");?>
<span class='input-group-addon fix-border'></span>
</div>
</div>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->linkPlan;?></th>
<td id="plansBox" colspan="3">
<div class='row'>
<?php $i = 0;?>
<?php foreach($linkedProducts as $product):?>
<?php $plans = zget($productPlans, $product->id, array(0 => ''));?>
<div class="col-sm-4" id="plan<?php echo $i;?>" style="padding-right: 6px;"><?php echo html::select("plans[" . $product->id . "]", $plans, $product->plan, "class='form-control chosen'");?></div>
<?php $i++;?>
<?php endforeach;?>
<div class="col-sm-4" id="planDefault" style="padding-right: 6px;"><?php echo html::select("plans[0]", array(), 0, "class='form-control chosen'");?></div>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->PRJDesc;?></th>
<td colspan='3'>
<?php echo html::textarea('desc', $project->desc, "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?>
</td>
</tr>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
</tr>
<tr class="<?php if($project->acl == 'open') echo 'hidden';?>" id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td><?php echo html::select('whitelist[]', $users, $project->whitelist, 'class="form-control chosen" multiple');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->project->auth;?></th>
<td colspan='3'><?php echo html::radio('auth', $lang->project->PRJAuthList, $project->auth, '', 'block');?></td>
</tr>
<tr>
<td colspan='4' class='text-center form-actions'>
<?php
echo html::hidden('model', $project->model);
echo html::submitButton();
echo html::backButton();
?>
</td>
</tr>
</table>
</form>
</div>
</div>
<div id='PRJAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->PRJAclList, $project->acl == 'project' ? 'private' : 'open', "onclick='setWhite(this.value);'", 'block'));?>
</div>
<div id='PGMAcl' class='hidden'>
<?php echo nl2br(html::radio('acl', $lang->project->PGMPRJAclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?>
</div>
<div class="modal fade" id="promptBox">
<div class="modal-dialog mw-600px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
<h4 class="modal-title"><?php printf($lang->project->changeProgram, $project->name);?></h4>
</div>
<div class="modal-body">
<table class='table table-form' id='promptTable'>
<thead>
<tr>
<th class='text-left'><?php echo $lang->project->multiLinkedProductsTip;?></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-70
View File
@@ -1,70 +0,0 @@
<?php
/**
* The prigroup view file of project 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 project
* @version $Id: prigroup.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<?php js::set('confirmDelete', $lang->group->confirmDelete);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php echo html::backButton($lang->goback, '', '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'>
<?php if(common::hasPriv('project', 'PRJCreateGroup')) echo html::a($this->createLink('project', 'PRJCreateGroup', "projectID=$projectID&projectID=$projectID", '', true), '<i class="icon-plus"></i> ' . $lang->group->create, '', 'class="btn btn-primary iframe" data-width="550"');?>
</div>
</div>
<div id='mainContent' class='main-table'>
<table class='table tablesorter' id='groupList'>
<thead>
<tr>
<th class='w-id text-center'><?php echo $lang->group->id;?></th>
<th class='w-130px'><?php echo $lang->group->name;?></th>
<th class='w-300px'><?php echo $lang->group->desc;?></th>
<th><?php echo $lang->group->users;?></th>
<th class='c-actions-6 text-center'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($groups as $group):?>
<?php $users = implode(',', $groupUsers[$group->id]);?>
<tr>
<td class='text-center'><?php echo $group->id;?></td>
<td><?php echo $group->name;?></td>
<td title='<?php echo $group->desc?>'><?php echo $group->desc;?></td>
<td title='<?php echo $users;?>'><?php echo $users;?></td>
<td class='c-actions'>
<?php $lang->group->managepriv = $lang->group->managePrivByGroup;?>
<?php $disabled = $group->role == 'limited' ? 'disabled' : '';?>
<?php common::printIcon('project', 'PRJManageView', "groupID=$group->id&projectID=$projectID&projectID=$projectID", $group, 'list', 'eye', '', $disabled);?>
<?php common::printIcon('project', 'PRJManagePriv', "type=byGroup&param=$group->id", $group, 'list', 'lock');?>
<?php $lang->group->managemember = $lang->group->manageMember;?>
<?php common::printIcon('project', 'PRJManageGroupMember', "groupID=$group->id", $group, 'list', 'persons', '', 'iframe', 'yes', "data-width='90%'");?>
<?php common::printIcon('project', 'PRJEditGroup', "groupID=$group->id", $group, 'list', 'edit', '', 'iframe', 'yes', "data-width='550'");?>
<?php common::printIcon('project', 'PRJCopyGroup', "groupID=$group->id", $group, 'list', 'copy', '', "iframe $disabled", 'yes', "data-width='550'");?>
<?php
if(common::hasPriv('group', 'delete') and $group->role != 'limited')
{
$deleteURL = $this->createLink('group', 'delete', "groupID=$group->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"groupList\", confirmDelete)", '<i class="icon icon-trash"></i>', '', "title='{$lang->group->delete}' class='btn'");
}
else
{
echo "<button class='btn disabled'><i class='icon icon-trash disabled' title='{$lang->group->delete}'></i></button>";
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<?php include '../../common/view/footer.html.php';?>
@@ -1,115 +0,0 @@
<?php include '../../common/view/header.html.php';?>
<?php js::set('projectID', $project->id);?>
<?php js::set('roles', $roles);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<span class='btn btn-link btn-active-text'>
<?php echo html::a($this->createLink('project', 'prjmanagemembers', "projectID={$project->id}"), "<span class='text'> {$lang->project->manageMembers}</span>");?>
</span>
<div class='input-group space w-200px'>
<span class='input-group-addon'><?php echo $lang->project->selectDept?></span>
<?php echo html::select('dept', $depts, $dept, "class='form-control chosen' onchange='setDeptUsers(this)' data-placeholder='{$lang->project->selectDeptTitle}'");?>
</div>
</div>
</div>
<div id='mainContent' class='main-content'>
<form class='main-form form-ajax' method='post' id='teamForm'>
<table class='table table-form'>
<thead>
<tr class='text-center'>
<th><?php echo $lang->team->account;?></th>
<th><?php echo $lang->team->role;?></th>
<th class='w-100px'><?php echo $lang->team->days;?></th>
<th class='w-100px'><?php echo $lang->team->hours;?></th>
<th class='w-110px'><?php echo $lang->team->limited;?></th>
<th class="w-90px"> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php $i = 0; $memberCount = 0;?>
<?php foreach($currentMembers as $member):?>
<?php if(!isset($users[$member->account])) continue;?>
<?php unset($users[$member->account]);?>
<tr>
<td><input type='text' name='realnames[]' id='account<?php echo $i;?>' value='<?php echo $member->realname;?>' readonly class='form-control' /></td>
<td><input type='text' name='roles[]' id='role<?php echo $i;?>' value='<?php echo $member->role;?>' class='form-control' /></td>
<td><input type='text' name='days[] ' id='days<?php echo $i;?>' value='<?php echo $member->days;?>' class='form-control' /></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo $i;?>' value='<?php echo $member->hours;?>' class='form-control' />
<input type='hidden' name='accounts[]' value='<?php echo $member->account;?>' />
</td>
<td><?php echo html::radio("limited[$i]", $lang->team->limitedList, $member->limited);?></td>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
<?php $i ++; $memberCount ++;?>
<?php endforeach;?>
<?php foreach($deptUsers as $deptAccount => $userName):?>
<?php if(!isset($users[$deptAccount])) continue;?>
<tr class='addedItem'>
<td><?php echo html::select("accounts[]", $users, $deptAccount, "class='form-control chosen' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo $i;?>' class='form-control' value='<?php echo $roles[$deptAccount]?>'/></td>
<td><input type='text' name='days[]' id='days<?php echo $i;?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo $i;?>' class='form-control' value='<?php echo $config->project->defaultWorkhours?>' />
</td>
<td><?php echo html::radio("limited[$i]", $lang->team->limitedList, 'no');?></td>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
<?php unset($users[$deptAccount]);?>
<?php $i ++; $memberCount ++;?>
<?php endforeach;?>
<?php for($j = 0; $j < 5; $j ++):?>
<tr class='addedItem'>
<td><?php echo html::select("accounts[]", $users, '', "class='form-control chosen' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo ($i);?>' class='form-control' /></td>
<td><input type='text' name='days[]' id='days<?php echo ($i);?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo ($i);?>' class='form-control' value='<?php echo $config->project->defaultWorkhours?>' />
</td>
<td><?php echo html::radio("limited[$i]", $lang->team->limitedList, 'no');?></td>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
<?php $i ++; $memberCount ++;?>
<?php endfor;?>
</tbody>
<tfoot>
<tr>
<td colspan='6' class='text-center form-actions'>
<?php echo html::submitButton() . html::backButton();?>
</td>
</tr>
</tfoot>
</table>
<?php js::set('i', $i);?>
</form>
</div>
<div>
<?php $i = '%i%';?>
<table class='hidden'>
<tr id='addItem' class='hidden'>
<td><?php echo html::select("accounts[]", $users, '', "class='form-control' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo ($i);?>' class='form-control' /></td>
<td><input type='text' name='days[]' id='days<?php echo ($i);?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
<input type='text' name='hours[]' id='hours<?php echo ($i);?>' class='form-control' value='<?php echo $config->project->defaultWorkhours?>' />
</td>
<td><?php echo html::radio("limited[$i]", $lang->team->limitedList, 'no');?></td>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
</table>
</div>
<?php include '../../common/view/footer.html.php';?>
-187
View File
@@ -1,187 +0,0 @@
<?php
/**
* The manage privilege view of group 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 group
* @version $Id: managepriv.html.php 4129 2013-01-18 01:58:14Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php'; ?>
<style>
.table-bymodule select.form-control {height:250px}
.group-item {display:block; width:220px; float:left; font-size: 14px}
.group-item .checkbox-inline label{padding-left:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.table.table-form tbody > tr:last-child td {border-top: 1px solid #ddd}
@-moz-document url-prefix(){.table.table-form tbody > tr:last-child td, .table.table-form tbody > tr:last-child th {border-bottom: 1px solid #ddd}}
#mainMenu #groupName{line-height:33px; float: left}
.checkbox-right{padding-left:0px !important;}
td.menus {border-right: 0;padding-right: 0;width: 220px !important;}
td.menus + td {border-left: 0;}
.menus .checkbox-primary {float: left; width: 220px;}
.menus .checkbox-primary:first-child {float: left; width: auto;}
.menus a {margin-left: 10px;}
</style>
<?php if($group->role == 'limited'):?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<a href='javascript:;' class='btn btn-link btn-active-text'><span class='text'><?php echo $group->name;?></span></a>
</div>
</div>
<div id='mainContent' class='main-content'>
<form class="load-indicator main-form form-ajax" id="managePrivForm" method="post" target='hiddenwin'>
<table class='table table-hover table-striped table-bordered'>
<thead>
<tr class='text-center'>
<th><?php echo $lang->group->module;?></th>
<th><?php echo $lang->group->method;?></th>
</tr>
</thead>
<tr class='<?php echo cycle('even, bg-gray');?>'>
<th class='text-right thWidth'><?php echo $lang->my->common;?></th>
<td id='my' class='pv-10px'>
<div class='checkbox-primary'>
<input type='checkbox' name='actions[my][]' value='limited' <?php if(isset($groupPrivs['my']['limited'])) echo "checked";?> />
<label class='priv' id="my-limited"><?php echo $lang->my->limited;?></label>
</div>
</td>
</tr>
<tr>
<th class='text-right'></th>
<td class='form-actions'>
<?php echo html::submitButton('', "onclick='setNoChecked()'");?>
<?php echo html::backButton();?>
<?php echo html::hidden('noChecked'); // Save the value of no checked.?>
</td>
</tr>
</table>
</form>
</div>
<?php else:?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<span id='groupName'><i class='icon-lock'></i> <?php echo $group->name;?> <i class="icon icon-chevron-right"></i></span>
<?php $params = "type=byGroup&param=$groupID";?>
<?php echo html::a(inlink('pgmmanagepriv', $params), "<span class='text'>{$lang->group->all}</span>", '', "class='btn btn-link btn-active-text'")?>
</div>
</div>
<div id='mainContent' class='main-content'>
<form class="load-indicator main-form form-ajax" id="managePrivForm" method="post" target='hiddenwin'>
<table class='table table-hover table-striped table-bordered' id='privList'>
<thead>
<tr class='text-center'>
<th class='thWidth'><?php echo $lang->group->module;?></th>
<th colspan='2'><?php echo $lang->group->method;?></th>
</tr>
</thead>
<?php foreach($lang->resource as $moduleName => $moduleActions):?>
<?php if(!count((array)$moduleActions)) continue;?>
<?php if(!$this->group->checkMenuModule($menu, $moduleName)) continue;?>
<?php
/* Check method in select version. */
if($version)
{
$hasMethod = false;
foreach($moduleActions as $action => $actionLabel)
{
if(strpos($changelogs, ",$moduleName-$actionLabel,") !== false)
{
$hasMethod = true;
break;
}
}
if(!$hasMethod) continue;
}
?>
<tr class='<?php echo cycle('even, bg-gray');?>'>
<th class='text-middle text-right thWidth'>
<div class="checkbox-primary checkbox-inline checkbox-right check-all">
<input type='checkbox' id='allChecker<?php echo $moduleName;?>'>
<label class='text-right' for='allChecker<?php echo $moduleName;?>'><?php echo $lang->$moduleName->common;?></label>
</div>
</th>
<?php if(isset($lang->$moduleName->menus)):?>
<td class='menus'>
<?php echo html::checkbox("actions[$moduleName]", array('browse' => $lang->$moduleName->browse), isset($groupPrivs[$moduleName]) ? $groupPrivs[$moduleName] : '');?>
<a href='javascript:;'><i class='icon icon-plus'></i></a>
<?php echo html::checkbox("actions[$moduleName]", $lang->$moduleName->menus, isset($groupPrivs[$moduleName]) ? $groupPrivs[$moduleName] : '');?>
</td>
<?php endif;?>
<td id='<?php echo $moduleName;?>' class='pv-10px' colspan='<?php echo !empty($lang->$moduleName->menus) ? 1 : 2?>'>
<?php $i = 1;?>
<?php foreach($moduleActions as $action => $actionLabel):?>
<?php if(!empty($lang->$moduleName->menus) and $action == 'browse') continue;;?>
<?php if(!empty($version) and strpos($changelogs, ",$moduleName-$actionLabel,") === false) continue;?>
<div class='group-item'>
<?php echo html::checkbox("actions[{$moduleName}]", array($action => $lang->$moduleName->$actionLabel), isset($groupPrivs[$moduleName][$action]) ? $action : '', '', 'inline');?>
</div>
<?php endforeach;?>
</td>
</tr>
<?php endforeach;?>
<tr>
<th class='text-right'>
<div class="checkbox-primary checkbox-inline checkbox-right check-all">
<input type='checkbox' id='allChecker'>
<label class='text-right' for='allChecker'><?php echo $lang->selectAll;?></label>
</div>
</th>
<td class='form-actions' colspan='2'>
<?php echo html::submitButton('', "onclick='setNoChecked()'", 'btn btn-wide btn-primary');?>
<?php echo html::backButton();?>
<?php echo html::hidden('noChecked'); // Save the value of no checked.?>
</td>
</tr>
</table>
</form>
</div>
<?php endif;?>
<?php js::set('groupID', $groupID);?>
<?php js::set('menu', $menu);?>
<script>
$(document).ready(function()
{
/**
* 隐藏列表标签。
* Hide tabs except the browse list tab.
*/
$('.menus input[name^=actions]:not(input[value=browse])').parent('.checkbox-primary').hide();
/**
* 切换列表标签的显示。
* Toggle display of tabs except the browse list tab.
*/
$('.menus .icon-plus').click(function()
{
$(this).toggleClass('icon-minus', 'icon-plus');
$('.menus input[name^=actions]:not(input[value=browse])').parent('.checkbox-primary').toggle();
})
/**
* 勾选浏览列表标签时,自动勾选下面的所有标签。
* Check all tabs when the Browse list tab is selected.
*/
$('.menus input[value=browse]').change(function()
{
$(this).parents('.menus').find('[name^=actions]').prop('checked', $(this).prop('checked'));
});
/**
* 勾选浏览列表标签下面的任意一个标签时,自动勾选浏览列表标签。
* Check the browse list tab when any one of the tabs is selected.
*/
$('.menus input[name^=actions]:not(input[value=browse])').click(function()
{
var $parent = $(this).parents('.menus');
$parent.find('input[value=browse]').prop('checked', $parent.find('input[name^=actions]:not(input[value=browse]):checked').length > 0);
})
});
</script>
<?php include '../../common/view/footer.html.php'; ?>
@@ -1,69 +0,0 @@
<?php
/**
* The manage prjmanageproducts view of project 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 project
* @version $Id
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->project->manageProducts;?></span></span>
</div>
</div>
<div id='mainContent'>
<div class='cell'>
<form class='main-form form-ajax' method='post' id='productsBox' enctype='multipart/form-data'>
<div class='detail'>
<div class='detail-title'><?php echo $lang->project->linkedProducts;?></div>
<div class='detail-content row'>
<?php foreach($allProducts as $productID => $productName):?>
<?php if(isset($linkedProducts[$productID])):?>
<?php $isDisabled = in_array($productID, $unmodifiableProducts) ? "disabled='disabled'" : '';?>
<?php $title = in_array($productID, $unmodifiableProducts) ? $lang->project->notAllowRemoveProducts : $productName;?>
<?php $checked = 'checked';?>
<div class='col-sm-4'>
<div class='product <?php echo $checked . (isset($branchGroups[$productID]) ? ' has-branch' : '')?>'>
<div class="checkbox-primary" title='<?php echo $title;?>'>
<?php echo "<input type='checkbox' name='products[$productID]' value='$productID' $checked id='products{$productID}' $isDisabled>";?>
<label class='text-ellipsis checkbox-inline' for='<?php echo 'products' . $productID;?>' title='<?php echo $productName;?>'><?php echo $productName;?></label>
</div>
<?php if(isset($branchGroups[$productID])) echo html::select("branch[$productID]", $branchGroups[$productID], $linkedProducts[$productID]->branch, "class='form-control chosen'");?>
</div>
</div>
<?php if(!empty($isDisabled)) echo html::hidden("products[$productID]", $productID);?>
<?php unset($allProducts[$productID]);?>
<?php endif;?>
<?php endforeach;?>
</div>
</div>
<div class='detail'>
<div class='detail-title'><?php echo $lang->project->unlinkedProducts;?></div>
<div class='detail-content row'>
<?php foreach($allProducts as $productID => $productName):?>
<div class='col-sm-4'>
<div class='product<?php echo isset($branchGroups[$productID]) ? ' has-branch' : ''?>'>
<div class="checkbox-primary" title='<?php echo $productName;?>'>
<?php echo "<input type='checkbox' name='products[$productID]' value='$productID' id='products{$productID}'>";?>
<label class='text-ellipsis checkbox-inline' for='<?php echo 'products' . $productID;?>'><?php echo $productName;?></label>
</div>
<?php if(isset($branchGroups[$productID])) echo html::select("branch[$productID]", $branchGroups[$productID], '', "class='form-control chosen'");?>
</div>
</div>
<?php endforeach;?>
</div>
</div>
<div class="detail text-center form-actions">
<?php echo html::hidden("post", 'post');?>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</div>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
@@ -1,86 +0,0 @@
<?php
/**
* The manage view by project view of group 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 Yidong Wang <yidong@cnezsoft.com>
* @package group
* @version $Id: managepriv.html.php 1517 2011-03-07 10:02:57Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2 title='<?php echo $group->name;?>'>
<span id='groupName'><i class='icon-lock'></i> <?php echo $group->name;?></span>
<small> <?php echo $lang->arrow . $lang->group->manageView;?></small>
</h2>
</div>
<form class="load-indicator main-form form-ajax" id="manageViewForm" method="post" target='hiddenwin'>
<table class='table table-form'>
<!--tr>
<th class='text-bottom thWidth'><?php echo $lang->group->viewList;?></th>
<td class='text-bottom'>
<?php foreach($lang->menu as $menuKey => $menu):?>
<?php if(!is_string($menu)) continue;?>
<?php list($moduleName, $module) = explode('|', $menu);?>
<?php if($module == 'my') continue;?>
<?php $moduleName = strip_tags($moduleName);?>
<div class='group-item'>
<div class='checkbox-primary'>
<input type='checkbox' id='<?php echo $menuKey?>' name='actions[views][<?php echo strtolower($menuKey);?>]' value='<?php echo $menuKey;?>' <?php if(isset($group->acl['views'][$menuKey]) or empty($group->acl['views'])) echo "checked";?> />
<label class='priv' for='<?php echo $menuKey?>'>
<?php echo $moduleName;?>
</label>
</div>
</div>
<?php endforeach;?>
<div class='group-item'>
<div class='checkbox-primary'>
<input type="checkbox" id='allchecker' name="allchecker" onclick="selectAll(this)" <?php if(empty($group->acl['views'])) echo "checked";?> />
<label class='priv' for='allchecker'>
<?php echo $lang->selectAll?>
</label>
</div>
</div>
</td>
</tr-->
<tr id='productBox'>
<th class='text-right'><?php echo $lang->group->productList?></th>
<td>
<?php if($products):?>
<div class='input-group'>
<?php echo html::select("actions[products][]", $products, isset($group->acl['products']) ? join(',', $group->acl['products']) : '', "class='form-control chosen' multiple")?>
<span class='input-group-addon strong'><?php echo $lang->group->noticeVisit?></span>
</div>
<?php else:?>
<?php echo $lang->group->noneProduct;?>
<?php endif;?>
</td>
</tr>
<tr id='projectBox'>
<th class='text-right'><?php echo $lang->group->projectList?></th>
<td>
<?php if($projects):?>
<div class='input-group'>
<?php echo html::select("actions[projects][]", $projects, isset($group->acl['projects']) ? join(',', $group->acl['projects']) : '', "class='form-control chosen' multiple")?>
<span class='input-group-addon strong'><?php echo $lang->group->noticeVisit?></span>
</div>
<?php else:?>
<?php echo $lang->group->noneProject;?>
<?php endif;?>
</td>
</tr>
<tr>
<td colspan='2' class='form-actions text-center'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
<?php echo html::hidden('foo'); // Just a hidden var, to make sure $_POST is not empty.?>
</td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
@@ -1,32 +0,0 @@
<?php
/**
* The prjprojecttitle view file of project 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 project
* @version $Id: prjprojecttitle.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div class="modal-header">
<h4 class="modal-title"><i class="icon-cog"></i><?php echo $lang->project->PRJModuleSetting;?></h4>
</div>
<div class="modal-body" style="max-height: 564px; overflow: visible;">
<form class="form-condensed" method="post" target="hiddenwin">
<table class="table table-form">
<tbody>
<tr>
<td class="w-180px"><?php echo $lang->project->PRJModuleOpen;?></td>
<td><?php echo html::radio('PRJProgramTitle', $lang->project->PRJProgramTitle, $status);?></td>
</tr>
<tr>
<td colspan="2" class="text-center"><?php echo html::submitButton();?></td>
</tr>
</tbody>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
-50
View File
@@ -1,50 +0,0 @@
<?php
/**
* The prjstart view file of project 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 project
* @version $Id: prjstart.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
<?php if(!isonlybody()):?>
<small><?php echo $lang->arrow . $lang->project->start;?></small>
<?php endif;?>
</h2>
</div>
<form class='load-indicator main-form' method='post' target='hiddenwin'>
<table class='table table-form'>
<tbody>
<tr>
<th class='w-100px'><?php echo $lang->project->realBegan;?></th>
<td><?php echo html::input('realBegan', helper::today(), "class='form-control form-date'");?></td>
<td></td>
</tr>
<tr>
<th class='w-40px'><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton($lang->project->start);?>
</td>
</tr>
</tbody>
</table>
</form>
<hr class='small' />
<div class='main'>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-235
View File
@@ -1,235 +0,0 @@
<?php
/**
* The view method view file of project 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 project
* @version $Id: view.html.php 4594 2013-03-13 06:16:02Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class="main-row">
<div class="col-8 main-col">
<div class="row">
<div class="col-sm-6">
<div class="panel block-dynamic" style="height: 280px">
<div class="panel-heading">
<div class="panel-title"><?php echo $lang->project->latestDynamic;?></div>
<nav class="panel-actions nav nav-default">
<li><?php common::printLink('project', 'dynamic', "projectID=$project->id&type=all", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
</nav>
</div>
<div class="panel-body scrollbar-hover">
<ul class="timeline timeline-tag-left no-margin">
<?php foreach($dynamics as $action):?>
<li <?php if($action->major) echo "class='active'";?>>
<div class='text-ellipsis'>
<span class="timeline-tag"><?php echo $action->date;?></span>
<span class="timeline-text"><?php echo zget($users, $action->actor) . ' ' . "<span class='label-action'>{$action->actionLabel}</span>" . $action->objectLabel . ' ' . html::a($action->objectLink, $action->objectName, '', "title='$action->objectName'");?></span>
</div>
</li>
<?php endforeach;?>
</ul>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="panel block-team" style="height: 280px">
<div class="panel-heading">
<div class="panel-title"><?php echo $lang->project->relatedMember;?></div>
<nav class="panel-actions nav nav-default">
<li><?php common::printLink('project', 'PRJManageMembers', "projectID=$project->id", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
</nav>
</div>
<div class="panel-body">
<div class="row row-grid">
<?php $i = 9; $j = 0;?>
<?php if($project->PM):?>
<?php $i--;?>
<?php unset($teamMembers[$project->PM]);?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $project->PM);?> <span class="text-muted">(<?php echo $lang->project->PRJPM;?>)</span></div>
<?php endif;?>
<?php if($project->PO):?>
<?php $i--;?>
<?php unset($teamMembers[$project->PO]);?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $project->PO);?> <span class="text-muted">(<?php echo $lang->project->PO;?>)</span></div>
<?php endif;?>
<?php if($project->QD):?>
<?php $i--;?>
<?php unset($teamMembers[$project->QD]);?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $project->QD);?> <span class="text-muted">(<?php echo $lang->project->QD;?>)</span></div>
<?php endif;?>
<?php if($project->RD):?>
<?php $i--;?>
<?php unset($teamMembers[$project->RD]);?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $project->RD);?> <span class="text-muted">(<?php echo $lang->project->RD;?>)</span></div>
<?php endif;?>
<?php foreach($teamMembers as $teamMember):?>
<?php if($j > $i) break;?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $teamMember->account);?></div>
<?php $j++;?>
<?php endforeach;?>
<div class="col-xs-6">
<?php common::printLink('project', 'PRJManageMembers', "projectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> &nbsp;" . $lang->project->manageMembers, '', "class='text-muted'");?>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12">
<?php $blockHistory = true;?>
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=project&objectID=$project->id");?>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<div class='main-actions'>
<div class="btn-toolbar">
<?php
$params = "project=$project->id";
common::printBack(inlink('prjbrowse'));
if(!$project->deleted)
{
echo "<div class='divider'></div>";
common::printIcon('project', 'PRJStart', "projectID=$project->id", $project, 'button', 'play', '', 'iframe', true, '', $lang->project->start);
common::printIcon('project', 'PRJActivate', "projectID=$project->id", $project, 'button', 'magic', '', 'iframe', true, '', $lang->project->activate);
common::printIcon('project', 'PRJSuspend', "projectID=$project->id", $project, 'button', 'pause', '', 'iframe', true, '', $lang->project->suspend);
common::printIcon('project', 'PRJClose', "projectID=$project->id", $project, 'button', 'off', '', 'iframe', true, '', $lang->close);
echo $this->buildOperateMenu($project, 'view');
echo "<div class='divider'></div>";
common::printIcon('project', 'PRJEdit', $params, $project, 'button', 'edit', '', '', '', '', $lang->edit);
common::printIcon('project', 'PRJDelete', $params, $project, 'button', 'trash', 'hiddenwin', '', '', '', $lang->delete);
}
?>
</div>
</div>
</div>
<div class="col-4 side-col">
<div class="row">
<div class="col-sm-12">
<div class="cell">
<div class="detail">
<h2 class="detail-title"><span class="label-id"><?php echo $project->id;?></span> <span class="label label-light label-outline"><?php echo $project->code;?></span> <?php echo $project->name;?></h2>
<div class="detail-content article-content">
<p><span class="text-limit" data-limit-size="40"><?php echo $project->desc;?></span><a class="text-primary text-limit-toggle small" data-text-expand="<?php echo $lang->expand;?>" data-text-collapse="<?php echo $lang->collapse;?>"></a></p>
<p>
<?php if($project->deleted):?>
<span class='label label-danger label-outline'><?php echo $lang->project->deleted;?></span>
<?php endif; ?>
<span class="label label-primary label-outline"><?php echo zget($lang->project->PRJLifeTimeList, $project->lifetime);?></span>
<?php if(isset($project->delay)):?>
<span class="label label-danger label-outline"><?php echo $lang->project->delayed;?></span>
<?php else:?>
<span class="label label-success label-outline"><?php echo $this->processStatus('project', $project);?></span>
<?php endif;?>
</p>
</div>
</div>
<div class="detail">
<div class="detail-title">
<strong><?php echo $lang->project->manageProducts;?></strong>
<?php common::printLink('project', 'manageproducts', "projectID=$project->id", '<i class="icon icon-more icon-sm"></i>', '', "class='btn btn-link pull-right muted'");?>
</div>
<div class="detail-content">
<div class="row row-grid">
<?php foreach($products as $productID => $product):?>
<?php $branchName = isset($branchGroups[$productID][$product->branch]) ? '/' . $branchGroups[$productID][$product->branch] : '';?>
<div class="col-xs-6">
<?php echo html::a($this->createLink('product', 'browse', "productID=$productID&branch=$product->branch"), "<i class='icon icon-cube text-muted'></i> " . $product->name . $branchName);?>
</div>
<?php endforeach;?>
</div>
</div>
</div>
<div class="detail">
<div class="detail-title"><strong><?php echo $lang->project->linkPlan;?></strong></div>
<div class="detail-content">
<div class="row row-grid">
<?php foreach($products as $productID => $product):?>
<?php if(isset($planGroups[$productID][$product->plan])):?>
<div class="col-xs-12"><?php echo html::a($this->createLink('productplan', 'view', "planID={$product->plan}"), $product->name . '/' . $planGroups[$productID][$product->plan]);?></div>
<?php endif;?>
<?php endforeach;?>
</div>
</div>
</div>
<div class='detail'>
<div class='detail-title'><strong><?php echo $lang->project->lblStats;?></strong></div>
<div class="detail-content">
<table class='table table-data data-stats'>
<tbody>
<tr class='statsTr'><td class='w-100px'></td><td></td><td></td><td></td></tr>
<tr>
<td colspan="4">
<?php $progress = ($workhour->totalConsumed + $workhour->totalLeft) ? floor($workhour->totalConsumed / ($workhour->totalConsumed + $workhour->totalLeft) * 1000) / 1000 * 100 : 0;?>
<?php echo $lang->project->progress;?> <em><?php echo $progress . $lang->percent;?></em> &nbsp;
<div class="progress inline-block">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $progress . $lang->percent;?>"></div>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->begin;?></th>
<td><?php echo $project->begin;?></td>
<th><?php echo $lang->project->totalEstimate;?></th>
<td><em><?php echo (float)$workhour->totalEstimate . $lang->project->workHour;?></em></td>
</tr>
<tr>
<th><?php echo $lang->project->end;?></th>
<td><?php echo $project->end;?></td>
<th><?php echo $lang->project->totalConsumed;?></th>
<td><em><?php echo (float)$workhour->totalConsumed . $lang->project->workHour;?></em></td>
</tr>
<tr>
<th><?php echo $lang->project->totalDays;?></th>
<td><?php echo $project->days;?></td>
<th><?php echo $lang->project->totalLeft;?></th>
<td><em><?php echo (float)$workhour->totalLeft . $lang->project->workHour;?></em></td>
</tr>
<tr>
<th><?php echo $lang->project->totalHours;?></th>
<td><em><?php echo (float)$workhour->totalHours . $lang->project->workHour;?></em></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="detail">
<div class="detail-title"><strong><?php echo $lang->project->basicInfo;?></strong></div>
<div class="detail-content">
<table class="table table-data data-basic">
<tbody>
<tr>
<th><?php echo $lang->story->common;?></th>
<td><em><?php echo $statData->storyCount;?></em></td>
<th><?php echo $lang->task->common;?></th>
<td><em><?php echo $statData->taskCount;?></em></td>
<th><?php echo $lang->bug->common;?></th>
<td><em><?php echo $statData->bugCount;?></em></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="detail">
<div class="detail-title"><strong><?php echo $lang->project->acl;?></strong></div>
<div class="detail-content">
<p><?php echo $lang->project->PGMPRJAclList[$project->acl];?></p>
</div>
</div>
<?php $this->printExtendFields($project, 'div', "position=right&inForm=0&inCell=1");?>
</div>
</div>
</div>
</div>
</div>
<div id="mainActions" class='main-actions'>
<nav class="container"></nav>
<?php include '../../common/view/footer.html.php';?>