* Adjust project/program module.
This commit is contained in:
+15
-15
@@ -72,11 +72,11 @@ class product extends control
|
||||
* @param string $status
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param int $PRJMine
|
||||
* @param int $projectMine
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function project($status = 'all', $productID = 0, $branch = 0, $PRJMine = 0)
|
||||
public function project($status = 'all', $productID = 0, $branch = 0, $projectMine = 0)
|
||||
{
|
||||
$this->product->setMenu($this->products, $productID, $branch);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
@@ -87,7 +87,7 @@ class product extends control
|
||||
|
||||
/* Get PM id list. */
|
||||
$accounts = array();
|
||||
$projectStats = $this->product->getProjectStatsByProduct($productID, $status, $branch, $PRJMine);
|
||||
$projectStats = $this->product->getProjectStatsByProduct($productID, $status, $branch, $projectMine);
|
||||
foreach($projectStats as $project)
|
||||
{
|
||||
if(!empty($project->PM) and !in_array($project->PM, $accounts)) $accounts[] = $project->PM;
|
||||
@@ -200,11 +200,11 @@ class product extends control
|
||||
if($this->app->rawModule == 'projectstory')
|
||||
{
|
||||
$this->session->set('currentProductType', $product->type);
|
||||
$projectProducts = $this->product->getProductsByProject($this->session->PRJ);
|
||||
$projectProducts = $this->product->getProductsByProject($this->session->project);
|
||||
$productPlans = $this->loadModel('project')->getPlans($projectProducts);
|
||||
|
||||
if($browseType == 'bybranch') $param = $branch;
|
||||
$stories = $this->story->getProjectStories($this->session->PRJ, $productID, $branch, $sort, $browseType, $param, 'story', '', $pager);
|
||||
$stories = $this->story->getProjectStories($this->session->project, $productID, $branch, $sort, $browseType, $param, 'story', '', $pager);
|
||||
}
|
||||
|
||||
/* Process the sql, get the conditon partion, save it to session. */
|
||||
@@ -299,7 +299,7 @@ class product extends control
|
||||
$this->executeHooks($productID);
|
||||
|
||||
$moduleName = $programID ? 'program' : $this->moduleName;
|
||||
$methodName = $programID ? 'pgmproduct' : 'browse';
|
||||
$methodName = $programID ? 'product' : 'browse';
|
||||
$param = $programID ? "programID=$programID" : "productID=$productID";
|
||||
$locate = $this->createLink($moduleName, $methodName, $param);
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
@@ -308,7 +308,7 @@ class product extends control
|
||||
if($programID)
|
||||
{
|
||||
$this->app->rawModule = 'program';
|
||||
$this->app->rawMethod = 'pgmproduct';
|
||||
$this->app->rawMethod = 'product';
|
||||
$this->lang->navGroup->program = 'program';
|
||||
$this->loadModel('program')->setPGMViewMenu($programID);
|
||||
$this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true);
|
||||
@@ -435,7 +435,7 @@ class product extends control
|
||||
$this->executeHooks($productID);
|
||||
|
||||
$moduleName = $programID ? 'program' : 'product';
|
||||
$methodName = $programID ? 'pgmproduct' : 'view';
|
||||
$methodName = $programID ? 'product' : 'view';
|
||||
$param = $programID ? "programID=$programID" : "product=$productID";
|
||||
$locate = $this->createLink($moduleName, $methodName, $param);
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
@@ -450,7 +450,7 @@ class product extends control
|
||||
if($programID)
|
||||
{
|
||||
$this->app->rawModule = 'program';
|
||||
$this->app->rawMethod = 'pgmproduct';
|
||||
$this->app->rawMethod = 'product';
|
||||
$this->lang->navGroup->program = 'program';
|
||||
$this->loadModel('program')->setPGMViewMenu($programID);
|
||||
$this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true);
|
||||
@@ -520,7 +520,7 @@ class product extends control
|
||||
}
|
||||
}
|
||||
|
||||
$locate = $this->createLink('program', 'pgmproduct', "programID=$programID");
|
||||
$locate = $this->createLink('program', 'product', "programID=$programID");
|
||||
die(js::locate($locate, 'parent'));
|
||||
}
|
||||
|
||||
@@ -542,7 +542,7 @@ class product extends control
|
||||
|
||||
/* Navigation remains under the program. */
|
||||
$this->app->rawModule = 'program';
|
||||
$this->app->rawMethod = 'pgmproduct';
|
||||
$this->app->rawMethod = 'product';
|
||||
$this->lang->navGroup->program = 'program';
|
||||
$this->loadModel('program')->setPGMViewMenu($programID);
|
||||
$this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true);
|
||||
@@ -899,7 +899,7 @@ class product extends control
|
||||
|
||||
$moduleGroup = zget($this->lang->navGroup, $module);
|
||||
$moduleGroup = in_array($moduleGroup, array('product', 'qa'))? $moduleGroup : 'project';
|
||||
$products = $moduleGroup == 'project' ? $this->product->getProductsByProject($this->session->PRJ) : $this->product->getList();
|
||||
$products = $moduleGroup == 'project' ? $this->product->getProductsByProject($this->session->project) : $this->product->getList();
|
||||
|
||||
$this->view->link = $this->product->getProductLink($module, $method, $extra);
|
||||
$this->view->productID = $productID;
|
||||
@@ -907,7 +907,7 @@ class product extends control
|
||||
$this->view->method = $method;
|
||||
$this->view->extra = $extra;
|
||||
$this->view->products = $products;
|
||||
$this->view->projectID = $moduleGroup == 'project' ? $this->session->PRJ : 0;
|
||||
$this->view->projectID = $moduleGroup == 'project' ? $this->session->project : 0;
|
||||
$this->view->programs = $this->loadModel('program')->getPGMPairs(true);
|
||||
$this->view->openApp = $moduleGroup;
|
||||
$this->display();
|
||||
@@ -957,7 +957,7 @@ class product extends control
|
||||
$moduleIndex = array_search('product', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
$this->view->project = $this->loadModel('program')->getPRJById($this->session->PRJ);
|
||||
$this->view->project = $this->loadModel('project')->getById($this->session->project);
|
||||
}
|
||||
|
||||
$this->loadModel($fromModule)->setMenu($this->products, key($this->products));
|
||||
@@ -1168,7 +1168,7 @@ class product extends control
|
||||
$this->session->set('productList', $this->app->getURI(true));
|
||||
|
||||
/* Get all product list. Locate to the create product page if there is no product. */
|
||||
$this->products = $this->product->getPairs('', $this->session->PRJ);
|
||||
$this->products = $this->product->getPairs('', $this->session->project);
|
||||
if(empty($this->products) and strpos('create|view', $this->methodName) === false) $this->locate($this->createLink('product', 'create'));
|
||||
|
||||
/* Get current product. */
|
||||
|
||||
+11
-11
@@ -864,11 +864,11 @@ class productModel extends model
|
||||
* @param int $productID
|
||||
* @param string $browseType
|
||||
* @param int $branch
|
||||
* @param int $PRJMine
|
||||
* @param int $projectMine
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectListByProduct($productID, $browseType = 'all', $branch = 0, $PRJMine = 0)
|
||||
public function getProjectListByProduct($productID, $browseType = 'all', $branch = 0, $projectMine = 0)
|
||||
{
|
||||
$projectList = $this->dao->select('t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
@@ -876,7 +876,7 @@ class productModel extends model
|
||||
->andWhere('t2.type')->eq('project')
|
||||
->beginIF($browseType != 'all')->andWhere('t2.status')->eq($browseType)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF($this->cookie->PRJMine or $PRJMine)
|
||||
->beginIF($this->cookie->projectMine or $projectMine)
|
||||
->andWhere('t2.openedBy', true)->eq($this->app->user->account)
|
||||
->orWhere('t2.PM')->eq($this->app->user->account)
|
||||
->markRight(1)
|
||||
@@ -899,13 +899,13 @@ class productModel extends model
|
||||
* @param int $productID
|
||||
* @param string $browseType
|
||||
* @param int $branch
|
||||
* @param int $PRJMine
|
||||
* @param int $projectMine
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectStatsByProduct($productID, $browseType = 'all', $branch = 0, $PRJMine = 0)
|
||||
public function getProjectStatsByProduct($productID, $browseType = 'all', $branch = 0, $projectMine = 0)
|
||||
{
|
||||
$projects = $this->getProjectListByProduct($productID, $browseType, $branch, $PRJMine);
|
||||
$projects = $this->getProjectListByProduct($productID, $browseType, $branch, $projectMine);
|
||||
if(empty($projects)) return array();
|
||||
|
||||
$projectKeys = array_keys($projects);
|
||||
@@ -914,12 +914,12 @@ class productModel extends model
|
||||
$emptyHour = array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0);
|
||||
|
||||
/* Get all tasks and compute totalEstimate, totalConsumed, totalLeft, progress according to them. */
|
||||
$tasks = $this->dao->select('id, PRJ, estimate, consumed, `left`, status, closedReason')
|
||||
$tasks = $this->dao->select('id, project, estimate, consumed, `left`, status, closedReason')
|
||||
->from(TABLE_TASK)
|
||||
->where('PRJ')->in($projectKeys)
|
||||
->where('project')->in($projectKeys)
|
||||
->andWhere('parent')->lt(1)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchGroup('PRJ', 'id');
|
||||
->fetchGroup('project', 'id');
|
||||
|
||||
/* Compute totalEstimate, totalConsumed, totalLeft. */
|
||||
foreach($tasks as $projectID => $projectTasks)
|
||||
@@ -990,7 +990,7 @@ class productModel extends model
|
||||
if(empty($productID)) return array();
|
||||
if(empty($projectID)) return $this->getAllExecutionPairsByProduct($productID, $branch);
|
||||
|
||||
$project = $this->loadModel('program')->getPRJByID($projectID);
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
$orderBy = $project->model == 'waterfall' ? 'begin_asc,id_asc' : 'begin_desc,id_desc';
|
||||
|
||||
$executions = $this->dao->select('t2.id,t2.name,t2.grade,t2.parent')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
@@ -1059,7 +1059,7 @@ class productModel extends model
|
||||
foreach($executions as $id => $execution) $projectIdList[$execution->project] = $execution->project;
|
||||
|
||||
$executionPairs = array();
|
||||
$projectPairs = $this->loadModel('program')->getPRJPairsByIdList($projectIdList);
|
||||
$projectPairs = $this->loadModel('project')->getPairsByIdList($projectIdList);
|
||||
foreach($executions as $id => $execution)
|
||||
{
|
||||
if($execution->grade == 2 && isset($executions[$execution->parent]))
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<?php include '../../common/view/datatable.fix.html.php';?>
|
||||
<?php js::set('browseType', $browseType);?>
|
||||
<?php js::set('productID', $productID);?>
|
||||
<?php js::set('projectID', $this->session->PRJ);?>
|
||||
<?php js::set('projectID', $this->session->project);?>
|
||||
<?php js::set('branch', $branch);?>
|
||||
<?php js::set('rawModule', $this->app->rawModule);?>
|
||||
<?php
|
||||
@@ -136,14 +136,14 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
|
||||
if($isProjectStory) $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=&projectID={$this->session->PRJ}");
|
||||
if($isProjectStory) $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=&projectID={$this->session->project}");
|
||||
$link = $this->createLink('tutorial', 'wizard', "module=story&method=create¶ms=$wizardParams");
|
||||
echo html::a($link, $lang->story->createCommon, '', "data-group='$openApp'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID=0&bugID=0&planID=0&todoID=0&extra=&type=$storyType");
|
||||
if($isProjectStory) $link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID={$this->session->PRJ}");
|
||||
if($isProjectStory) $link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID={$this->session->project}");
|
||||
$disabled = '';
|
||||
if(!common::hasPriv('story', 'create'))
|
||||
{
|
||||
@@ -158,7 +158,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<li <?php echo $batchDisabled;?>>
|
||||
<?php
|
||||
$batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project=0&plan=0&type=$storyType");
|
||||
if($isProjectStory) $batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project={$this->session->PRJ}");
|
||||
if($isProjectStory) $batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project={$this->session->project}");
|
||||
echo html::a($batchLink, $lang->story->batchCreate, '', "data-group='$openApp'");
|
||||
?>
|
||||
</li>
|
||||
@@ -178,7 +178,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
echo "<i class='icon-link'></i> {$lang->project->linkStory} <span class='caret'></span>";
|
||||
echo '</button>';
|
||||
echo "<ul class='dropdown-menu pull-right' id='linkActionMenu'>";
|
||||
if(common::hasPriv('projectstory', 'linkStory')) echo '<li>' . html::a($this->createLink('projectstory', 'linkStory', "project={$this->session->PRJ}"), $lang->project->linkStory). "</li>";
|
||||
if(common::hasPriv('projectstory', 'linkStory')) echo '<li>' . html::a($this->createLink('projectstory', 'linkStory', "project={$this->session->project}"), $lang->project->linkStory). "</li>";
|
||||
if(common::hasPriv('project', 'importPlanStories')) echo '<li>' . html::a('#linkStoryByPlan', $lang->project->linkStoryByPlan, '', 'data-toggle="modal"') . "</li>";
|
||||
echo '</ul>';
|
||||
}
|
||||
@@ -212,7 +212,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $storyType == 'story' ? $lang->story->noStory : $lang->story->noRequirement;?></span>
|
||||
<?php if(common::canModify('product', $product) and common::hasPriv('story', 'create')):?>
|
||||
<?php $projectID = $isProjectStory ? $this->session->PRJ : 0;?>
|
||||
<?php $projectID = $isProjectStory ? $this->session->project : 0;?>
|
||||
<?php $openApp = $isProjectStory ? 'project' : 'product';?>
|
||||
<?php echo html::a($this->createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}&storyID=0&projectID=$projectID&bugID=0&planID=0&todoID=0&extra=&type=$storyType"), "<i class='icon icon-plus'></i> " . $lang->story->createCommon, '', "class='btn btn-info' data-group='$openApp'");?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<?php foreach($lang->project->featureBar['all'] as $key => $label):?>
|
||||
<?php echo html::a(inlink("project", "status=$key&productID=$productID"), "<span class='text'>{$label}</span>" . ($status == $key ? " <span class='label label-light label-badge'>" . count($projectStats) . "</span>" : ''), '', "class='btn btn-link" . ($status == $key ? ' btn-active-text' : '') . "' id='{$key}Tab'");?>
|
||||
<?php endforeach;?>
|
||||
<?php echo html::checkbox('PRJMine', array('1' => $lang->program->mine), '', $this->cookie->PRJMine ? 'checked=checked' : '');?>
|
||||
<?php echo html::checkbox('projectMine', array('1' => $lang->program->mine), '', $this->cookie->projectMine ? 'checked=checked' : '');?>
|
||||
<div class="tip"><icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='right' data-tip-class='text-muted popover-sm' data-content=<?php echo $lang->product->projectInfo;?>></icon></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -23,7 +23,7 @@
|
||||
<?php if(empty($projectStats)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->program->noPRJ;?></span>
|
||||
<span class="text-muted"><?php echo $lang->project->empty;?></span>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
@@ -32,16 +32,16 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id w-50px'><?php echo $lang->idAB;?></th>
|
||||
<th><?php echo $lang->program->PRJName;?></th>
|
||||
<th class='w-150px'><?php echo $lang->program->common;?></th>
|
||||
<th class='w-80px'><?php echo $lang->program->PM;?></th>
|
||||
<th class='w-100px'><?php echo $lang->program->begin;?></th>
|
||||
<th class='w-100px'><?php echo $lang->program->end;?></th>
|
||||
<th class='w-100px'><?php echo $lang->program->PRJStatus;?></th>
|
||||
<th class='w-100px'><?php echo $lang->program->PRJBudget;?></th>
|
||||
<th class='w-80px text-center'><?php echo $lang->program->PRJEstimate;?></th>
|
||||
<th class='w-80px text-center'><?php echo $lang->program->PRJConsume;?></th>
|
||||
<th class='w-60px'><?php echo $lang->program->PRJProgress;?></th>
|
||||
<th><?php echo $lang->project->name;?></th>
|
||||
<th class='w-150px'><?php echo $lang->project->common;?></th>
|
||||
<th class='w-80px'><?php echo $lang->project->PM;?></th>
|
||||
<th class='w-100px'><?php echo $lang->project->begin;?></th>
|
||||
<th class='w-100px'><?php echo $lang->project->end;?></th>
|
||||
<th class='w-100px'><?php echo $lang->project->status;?></th>
|
||||
<th class='w-100px'><?php echo $lang->project->budget;?></th>
|
||||
<th class='w-80px text-center'><?php echo $lang->project->estimate;?></th>
|
||||
<th class='w-80px text-center'><?php echo $lang->project->consume;?></th>
|
||||
<th class='w-60px'><?php echo $lang->project->progress;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if($fromModule != 'product' && !empty($project)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->product->noProduct;?></span> <?php common::printLink('program', 'PRJManageProducts', "projectID=$project->id&programID=$project->parent", "<i class='icon icon-plus'></i> " . $lang->program->PRJManageProducts, '', "class='btn btn-info'");?></p>
|
||||
<p><span class="text-muted"><?php echo $lang->product->noProduct;?></span> <?php common::printLink('project', 'manageProducts', "projectID=$project->id&programID=$project->parent", "<i class='icon icon-plus'></i> " . $lang->project->manageProducts, '', "class='btn btn-info'");?></p>
|
||||
</div>
|
||||
<script>$("#menuNav .nav li a[href*='product']").closest('li').removeClass('active');</script>
|
||||
<?php else:?>
|
||||
|
||||
@@ -152,14 +152,14 @@ class program extends control
|
||||
$this->view->title = $this->lang->program->create;
|
||||
$this->view->position[] = $this->lang->program->create;
|
||||
|
||||
$this->view->pmUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst');
|
||||
$this->view->poUsers = $this->user->getPairs('noclosed|nodeleted|pofirst');
|
||||
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
|
||||
$this->view->parentProgram = $parentProgram;
|
||||
$this->view->parents = $this->program->getParentPairs();
|
||||
$this->view->programList = $this->program->getList();
|
||||
$this->view->budgetUnitList = $this->project->getBudgetUnitList();
|
||||
$this->view->availableBudget = $this->program->getBudgetLeft($parentProgram);
|
||||
$this->view->pmUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst');
|
||||
$this->view->poUsers = $this->user->getPairs('noclosed|nodeleted|pofirst');
|
||||
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
|
||||
$this->view->parentProgram = $parentProgram;
|
||||
$this->view->parents = $this->program->getParentPairs();
|
||||
$this->view->programList = $this->program->getList();
|
||||
$this->view->budgetUnitList = $this->project->getBudgetUnitList();
|
||||
$this->view->budgetLeft = $this->program->getBudgetLeft($parentProgram);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -633,7 +633,7 @@ class program extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetPGMDropMenu($programID = 0, $module, $method)
|
||||
public function ajaxGetDropMenu($programID = 0, $module, $method)
|
||||
{
|
||||
$this->view->programID = $programID;
|
||||
$this->view->module = $module;
|
||||
|
||||
+20
-20
@@ -128,11 +128,11 @@ class programModel extends model
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @param int $programTitle
|
||||
* @param int $PRJMine
|
||||
* @param int $projectMine
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getProjectList($programID = 0, $browseType = 'all', $queryID = 0, $orderBy = 'id_desc', $pager = null, $programTitle = 0, $PRJMine = 0)
|
||||
public function getProjectList($programID = 0, $browseType = 'all', $queryID = 0, $orderBy = 'id_desc', $pager = null, $programTitle = 0, $projectMine = 0)
|
||||
{
|
||||
$path = '';
|
||||
if($programID)
|
||||
@@ -148,7 +148,7 @@ class programModel extends model
|
||||
->beginIF($path)->andWhere('path')->like($path . '%')->fi()
|
||||
->beginIF(!$this->app->user->admin and $this->config->systemMode == 'new')->andWhere('id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF(!$this->app->user->admin and $this->config->systemMode == 'classic')->andWhere('id')->in($this->app->user->view->sprints)->fi()
|
||||
->beginIF($this->cookie->PRJMine or $PRJMine)
|
||||
->beginIF($this->cookie->projectMine or $projectMine)
|
||||
->andWhere('openedBy', true)->eq($this->app->user->account)
|
||||
->orWhere('PM')->eq($this->app->user->account)
|
||||
->markRight(1)
|
||||
@@ -308,28 +308,28 @@ class programModel extends model
|
||||
$this->loadModel('personnel')->updateWhitelist($whitelist, 'program', $programID);
|
||||
if($program->acl != 'open') $this->loadModel('user')->updateUserView($programID, 'program');
|
||||
|
||||
$this->file->updateObjectID($this->post->uid, $programID, 'project');
|
||||
$this->file->updateObjectID($this->post->uid, $programID, 'program');
|
||||
$this->setTreePath($programID);
|
||||
|
||||
/* Add program admin.*/
|
||||
$groupPriv = $this->dao->select('t1.*')->from(TABLE_USERGROUP)->alias('t1')
|
||||
->leftJoin(TABLE_GROUP)->alias('t2')->on('t1.group = t2.id')
|
||||
->where('t1.account')->eq($this->app->user->account)
|
||||
->andWhere('t2.role')->eq('PRJAdmin')
|
||||
->andWhere('t2.role')->eq('programAdmin')
|
||||
->fetch();
|
||||
|
||||
if(!empty($groupPriv))
|
||||
{
|
||||
$newProgram = $groupPriv->PRJ . ",$programID";
|
||||
$this->dao->update(TABLE_USERGROUP)->set('PRJ')->eq($newProgram)->where('account')->eq($groupPriv->account)->andWhere('`group`')->eq($groupPriv->group)->exec();
|
||||
$newProgram = $groupPriv->project . ",$programID";
|
||||
$this->dao->update(TABLE_USERGROUP)->set('program')->eq($newProgram)->where('account')->eq($groupPriv->account)->andWhere('`group`')->eq($groupPriv->group)->exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
$PRJAdminID = $this->dao->select('id')->from(TABLE_GROUP)->where('role')->eq('PRJAdmin')->fetch('id');
|
||||
$programAdminID = $this->dao->select('id')->from(TABLE_GROUP)->where('role')->eq('programAdmin')->fetch('id');
|
||||
$groupPriv = new stdclass();
|
||||
$groupPriv->account = $this->app->user->account;
|
||||
$groupPriv->group = $PRJAdminID;
|
||||
$groupPriv->PRJ = $programID;
|
||||
$groupPriv->group = $programAdminID;
|
||||
$groupPriv->project = $programID;
|
||||
$this->dao->insert(TABLE_USERGROUP)->data($groupPriv)->exec();
|
||||
}
|
||||
|
||||
@@ -624,12 +624,12 @@ class programModel extends model
|
||||
$this->loadModel('user')->updateUserView($programID, 'program', $changedAccounts);
|
||||
|
||||
/* Update children user view. */
|
||||
$childPGMList = $this->dao->select('id')->from(TABLE_PROJECT)->where('path')->like("%,$programID,%")->andWhere('type')->eq('program')->fetchPairs();
|
||||
$childPRJList = $this->dao->select('id')->from(TABLE_PROJECT)->where('path')->like("%,$programID,%")->andWhere('type')->eq('project')->fetchPairs();
|
||||
$childPrograms = $this->dao->select('id')->from(TABLE_PROJECT)->where('path')->like("%,$programID,%")->andWhere('type')->eq('program')->fetchPairs();
|
||||
$childProjects = $this->dao->select('id')->from(TABLE_PROJECT)->where('path')->like("%,$programID,%")->andWhere('type')->eq('project')->fetchPairs();
|
||||
$childProducts = $this->dao->select('id')->from(TABLE_PRODUCT)->where('program')->eq($programID)->fetchPairs();
|
||||
|
||||
if(!empty($childPGMList)) $this->user->updateUserView($childPGMList, 'program', $changedAccounts);
|
||||
if(!empty($childPRJList)) $this->user->updateUserView($childPRJList, 'project', $changedAccounts);
|
||||
if(!empty($childPrograms)) $this->user->updateUserView($childPrograms, 'program', $changedAccounts);
|
||||
if(!empty($childProjects)) $this->user->updateUserView($childProjects, 'project', $changedAccounts);
|
||||
if(!empty($childProducts)) $this->user->updateUserView($childProducts, 'product', $changedAccounts);
|
||||
}
|
||||
|
||||
@@ -799,14 +799,14 @@ class programModel extends model
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @param string $programTitle
|
||||
* @param int $PRJMine
|
||||
* @param int $projectMine
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectStats($programID = 0, $browseType = 'undone', $queryID = 0, $orderBy = 'id_desc', $pager = null, $programTitle = 0, $PRJMine = 0)
|
||||
public function getProjectStats($programID = 0, $browseType = 'undone', $queryID = 0, $orderBy = 'id_desc', $pager = null, $programTitle = 0, $projectMine = 0)
|
||||
{
|
||||
/* Init vars. */
|
||||
$projects = $this->getProjectList($programID, $browseType, $queryID, $orderBy, $pager, $programTitle, $PRJMine);
|
||||
$projects = $this->getProjectList($programID, $browseType, $queryID, $orderBy, $pager, $programTitle, $projectMine);
|
||||
if(empty($projects)) return array();
|
||||
|
||||
$projectKeys = array_keys($projects);
|
||||
@@ -815,12 +815,12 @@ class programModel extends model
|
||||
$emptyHour = array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0);
|
||||
|
||||
/* Get all tasks and compute totalEstimate, totalConsumed, totalLeft, progress according to them. */
|
||||
$tasks = $this->dao->select('id, PRJ, estimate, consumed, `left`, status, closedReason')
|
||||
$tasks = $this->dao->select('id, project, estimate, consumed, `left`, status, closedReason')
|
||||
->from(TABLE_TASK)
|
||||
->where('PRJ')->in($projectKeys)
|
||||
->where('project')->in($projectKeys)
|
||||
->andWhere('parent')->lt(1)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchGroup('PRJ', 'id');
|
||||
->fetchGroup('project', 'id');
|
||||
|
||||
/* Compute totalEstimate, totalConsumed, totalLeft. */
|
||||
foreach($tasks as $projectID => $projectTasks)
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php js::set('programID', $projectID);?>
|
||||
<?php js::set('module', $module);?>
|
||||
<?php js::set('method', $method);?>
|
||||
<div class="table-row">
|
||||
<div class="table-col col-left">
|
||||
<div class='list-group'>
|
||||
<?php echo $normalProjectsHtml;?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<?php echo html::a(helper::createLink('program', 'PRJBrowse', 'programID=0&status=all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->project->all, '', 'class="not-list-item"'); ?>
|
||||
<a class='pull-right toggle-right-col not-list-item'><?php echo $lang->project->doneProjects;?><i class='icon icon-angle-right'></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-col col-right">
|
||||
<div class='list-group'>
|
||||
<?php echo $closedProjectsHtml;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.tree li.has-list.open:before {border-left: none;}
|
||||
#projectTree li {padding: 0 0 0 8px;}
|
||||
#projectTree li.has-list {padding-left: 20px;}
|
||||
#projectTree li > a {display: block; padding: 5px 0; border-radius: 2px; padding-left: 6px; height: 30px;}
|
||||
#projectTree li > a > span {display: inline-block;}
|
||||
#projectTree li > a > span + span {margin-left: 8px;}
|
||||
#projectTree li.selected > a {background-color: #E8F3FC;}
|
||||
#projectTree li.selected > a > span.title {color: #006AF1;}
|
||||
#projectTree .label-id {border-color: #cbd0db; color: #7d8599}
|
||||
#projectTree .label.label-type {background: #fff; border: 1px solid #7d8599; color:#7d8599}
|
||||
|
||||
#projectTree li > a > span.title {color: #3C4353; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;}
|
||||
#projectTree li > a > span.user {color: #838a9d;}
|
||||
#projectTree li > a > span.user > .icon-person {font-size: 14px; position: relative; top: -1px; color: #a6aab8}
|
||||
|
||||
#projectTree li > .list-toggle {transform: rotate(0deg); width: 16px; height: 16px; border: 4px solid #a6aab8; border-radius: 2px; top: 7px;}
|
||||
#projectTree li > .list-toggle:before {content: ' '; display: block; position: absolute; border: 1px solid #a6aab8; top: 2px; left: -3px; right: -3px; bottom: 2px; min-width: 0; transition: all .2s;}
|
||||
#projectTree li > .list-toggle:hover:before,
|
||||
#projectTree li > .list-toggle:hover {border-color: #006AF1;}
|
||||
#projectTree li.open > .list-toggle {width: 12px; height: 12px; top: 9px; background-color: #a6aab8; border-width: 3px; left: 3px;}
|
||||
#projectTree li.open > .list-toggle:before {border: none; height: 2px; width: 6px; left: 0; top: 2px; background: #fff;}
|
||||
#projectTree li.open > .list-toggle:hover {background: #006AF1;}
|
||||
|
||||
#projectTree ul > li:after {display: block; position: absolute; content: ' '; border-top: 1px dashed #cbd0db; top: 15px; left: -12px; z-index: 1; width: 10px;}
|
||||
#projectTree ul > li:before,
|
||||
#projectTree ul > li.has-list:before {background: none; content: ' '; display: block; position: absolute; width: auto; height: auto; border: none; border-left: 1px dashed #cbd0db; top: -13px; bottom: 12px; left: -12px;}
|
||||
#projectTree ul > li:last-child:before {bottom: auto; height: 29px;}
|
||||
#projectTree ul > li:first-child:before {top: -9px;}
|
||||
#projectTree ul > li.has-list:first-child:before {top: -13px;}
|
||||
#projectTree ul > li.tree-single-item:before {height: 23px;}
|
||||
#projectTree ul > li.has-list:after {width: 14px;}
|
||||
#projectTree ul > li.item-meas a.selected{color: #0c64eb;}
|
||||
#showClosed1 + label{color: #3c4353}
|
||||
</style>
|
||||
<script>
|
||||
$('#projectTree').tree();
|
||||
</script>
|
||||
@@ -219,7 +219,7 @@ class project extends control
|
||||
$this->view->pager = $pager;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $this->project->getByID($projectID);
|
||||
$this->view->ProjectTree = $this->project->getTreeMenu(0, array('projectmodel', 'createManageLink'), 0, 'list');
|
||||
$this->view->projectTree = $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;
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
$(function()
|
||||
{
|
||||
$('input[name^="mine"]').click(function()
|
||||
$('#projectMine').click(function()
|
||||
{
|
||||
var mine = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('mine', mine, {expires:config.cookieLife, path:config.webRoot});
|
||||
$.cookie('projectMine', mine, {expires:config.cookieLife, path:config.webRoot});
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
|
||||
$('#project' + projectID).addClass('active');
|
||||
$(".tree .active").parent('li').addClass('active');
|
||||
|
||||
+227
-22
@@ -1,33 +1,238 @@
|
||||
$(function()
|
||||
{
|
||||
$('#copyProjects a').click(function(){setCopyProject($(this).data('id')); $('#copyProjectModal').modal('hide')});
|
||||
$('#isCat').change(function()
|
||||
$('#copyProjects a').click(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
$('#longTimeBox').removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#longTimeBox').addClass('hidden');
|
||||
$('#longTimeBox').find('#longTime').prop('checked', false).change();
|
||||
}
|
||||
setCopyProject($(this).data('id'));
|
||||
$('#copyProjectModal').modal('hide')
|
||||
});
|
||||
|
||||
$('#longTime').change(function()
|
||||
setAclList($("#parent").val());
|
||||
|
||||
if(typeof(currentPlanID) == 'undefined')
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
$('#productsBox select[id^="products"]').each(function()
|
||||
{
|
||||
$('#end').val('').attr('disabled', 'disabled');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#end').removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
var branchID = 0;
|
||||
if($(this).closest('.input-group').find('select[id^="branch"]').size() > 0)
|
||||
{
|
||||
var branchID = $(this).closest('.input-group').find('select[id^="branch"]').val();
|
||||
}
|
||||
loadPlans($(this), branchID);
|
||||
});
|
||||
}
|
||||
|
||||
$('[data-toggle="popover"]').popover();
|
||||
});
|
||||
|
||||
function setCopyProject(copiedProgramID)
|
||||
/**
|
||||
* Set parent project.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setParentProgram()
|
||||
{
|
||||
location.href = createLink('project', 'create', 'template=' + template + '&projectID=' + parentProgramID + '©ProgramID=' + copiedProgramID);
|
||||
var parentProgram = $("#parent").val();
|
||||
location.href = createLink('project', 'create', 'model=' + model + '&projectID=' + parentProgram + '&from=' + from);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set copy project.
|
||||
*
|
||||
* @param int $copyProjectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setCopyProject(copyProjectID)
|
||||
{
|
||||
location.href = createLink('project', 'create', 'model=' + model + '&projectID=' + projectID + '&from=' + from + '©ProjectID=' + copyProjectID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add new product.
|
||||
*
|
||||
* @param obj $obj
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function addNewProduct(obj)
|
||||
{
|
||||
if($(obj).attr('checked'))
|
||||
{
|
||||
$('#productName').removeAttr('disabled', true);
|
||||
$('#productName').closest('tr').removeClass('hidden');
|
||||
$('#plansBox .col-sm-4').find('select').attr('disabled', true).trigger("chosen:updated");
|
||||
$('#plansBox').closest('tr').addClass('hidden');
|
||||
$('#productsBox .col-sm-4 .input-group').find('select').attr('disabled', true).trigger("chosen:updated");
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#productName').attr('disabled', true);
|
||||
$('#productName').closest('tr').addClass('hidden');
|
||||
$('#plansBox .col-sm-4').find('select').removeAttr('disabled', true).trigger("chosen:updated");
|
||||
$('#plansBox').closest('tr').removeClass('hidden');
|
||||
$('#productsBox .col-sm-4 .input-group').find('select').removeAttr('disabled').trigger("chosen:updated");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set access control box.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setAclList(projectID)
|
||||
{
|
||||
if(projectID != 0)
|
||||
{
|
||||
$('.aclBox').html($('#programAcl').html());
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.aclBox').html($('#projectAcl').html());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load branches.
|
||||
*
|
||||
* @param int $product
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadBranches(product)
|
||||
{
|
||||
$('#productsBox select').each(function()
|
||||
{
|
||||
var $product = $(product);
|
||||
if($product.val() != 0 && $product.val() == $(this).val() && $product.attr('id') != $(this).attr('id'))
|
||||
{
|
||||
alert(errorSameProducts);
|
||||
$product.val(0);
|
||||
$product.trigger("chosen:updated");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if($('#productsBox .input-group:last select:first').val() != 0)
|
||||
{
|
||||
var length = $('#productsBox .input-group').size();
|
||||
var $html = $('#productsBox .col-sm-4:last').html();
|
||||
$('#productsBox .col-sm-4:last').find('.input-group-addon').remove();
|
||||
$('#productsBox .row').append('<div class="col-sm-4">' + $html + '</div>');
|
||||
if($('#productsBox .input-group:last select').size() >= 2) $('#productsBox .input-group:last select:last').remove();
|
||||
$('#productsBox .input-group:last .chosen-container').remove();
|
||||
$('#productsBox .input-group:last select:first').attr('name', 'products[' + length + ']').attr('id', 'products' + length);
|
||||
$('#productsBox .input-group:last .chosen').chosen();
|
||||
|
||||
adjustProductBoxMargin();
|
||||
}
|
||||
|
||||
var $inputgroup = $(product).closest('.input-group');
|
||||
if($inputgroup.find('select').size() >= 2) $inputgroup.removeClass('has-branch').find('select:last').remove();
|
||||
if($inputgroup.find('.chosen-container').size() >= 2) $inputgroup.find('.chosen-container:last').remove();
|
||||
|
||||
var index = $inputgroup.find('select:first').attr('id').replace('products' , '');
|
||||
$.get(createLink('branch', 'ajaxGetBranches', "productID=" + $(product).val()), function(data)
|
||||
{
|
||||
if(data)
|
||||
{
|
||||
$inputgroup.addClass('has-branch').append(data);
|
||||
$inputgroup.find('select:last').attr('name', 'branch[' + index + ']').attr('id', 'branch' + index).attr('onchange', "loadPlans('#products" + index + "', this.value)").chosen();
|
||||
}
|
||||
});
|
||||
|
||||
loadPlans(product);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load plans.
|
||||
*
|
||||
* @param obj $product
|
||||
* @param int $branchID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadPlans(product, branchID)
|
||||
{
|
||||
if($('#plansBox').size() == 0) return false;
|
||||
|
||||
var productID = $(product).val();
|
||||
var branchID = typeof(branchID) == 'undefined' ? 0 : branchID;
|
||||
var index = $(product).attr('id').replace('products', '');
|
||||
|
||||
if(productID != 0)
|
||||
{
|
||||
if(typeof(planID) == 'undefined') planID = 0;
|
||||
planID = $("select#plans" + productID).val() != '' ? $("select#plans" + productID).val() : planID;
|
||||
$.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + ((config.currentMethod == 'create' || config.currentMethod == 'edit') ? 'unexpired' : '')), function(data)
|
||||
{
|
||||
if(data)
|
||||
{
|
||||
if($("div#plan" + index).size() == 0) $("#plansBox .row").append('<div class="col-sm-4" id="plan' + index + '"></div>');
|
||||
$("div#plan" + index).html(data).find('select').attr('name', 'plans[' + productID + ']').attr('id', 'plans' + productID).chosen();
|
||||
|
||||
adjustPlanBoxMargin();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust product box margin.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function adjustProductBoxMargin()
|
||||
{
|
||||
var productRows = Math.ceil($('#productsBox > .row > .col-sm-4').length / 3);
|
||||
if(productRows > 1)
|
||||
{
|
||||
for(i = 1; i <= productRows - 1; i++)
|
||||
{
|
||||
$('#productsBox .col-sm-4:lt(' + (i * 3) + ')').css('margin-bottom', '10px');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust plan box margin.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function adjustPlanBoxMargin()
|
||||
{
|
||||
var planRows = Math.ceil($('#plansBox > .row > .col-sm-4').length / 3);
|
||||
if(planRows > 1)
|
||||
{
|
||||
for(j = 1; j <= planRows - 1; j++)
|
||||
{
|
||||
$('#plansBox .col-sm-4:lt(' + (j * 3) + ')').css('margin-bottom', '10px');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fuzzy search projects by project name.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
$('#projectName').on('keyup', function()
|
||||
{
|
||||
var name = $(this).val();
|
||||
name = name.replace(/\s+/g, '');
|
||||
link = createLink('project', 'ajaxGetCopyProjects');
|
||||
$.post(link, {name: name, cpoyProjectID : copyProjectID}, function(data)
|
||||
{
|
||||
$('#copyProjects').html(data);
|
||||
$('#copyProjects a').click(function()
|
||||
{
|
||||
setCopyProject($(this).data('id'));
|
||||
$('#copyProjectModal').modal('hide');
|
||||
});
|
||||
})
|
||||
})
|
||||
|
||||
+77
-22
@@ -1,31 +1,86 @@
|
||||
$(function()
|
||||
{
|
||||
var endDate = $('#end').val();
|
||||
$('#isCat').change(function()
|
||||
$('#parent').change(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
var projectID = $(this).val();
|
||||
|
||||
/* Determine whether the project can change the project set. */
|
||||
link = createLink('project', 'ajaxCheckProduct', 'projectID=' + projectID + '&projectID=' + projectID);
|
||||
$.getJSON(link, function(data)
|
||||
{
|
||||
$('#longTimeBox').removeClass('hidden');
|
||||
$('#longTime').change();
|
||||
}
|
||||
else
|
||||
var changed = true;
|
||||
|
||||
if(data && data.result)
|
||||
{
|
||||
changed = confirm(data.message);
|
||||
if(changed)
|
||||
{
|
||||
$('#productsBox select').prop('disabled', true).trigger("chosen:updated");
|
||||
}
|
||||
}
|
||||
|
||||
if(data && !data.result)
|
||||
{
|
||||
$('#promptTable tbody tr').remove();
|
||||
for(var i in data.message)
|
||||
{
|
||||
var product = data.message[i];
|
||||
$('#promptTable').append("<tr><td><i class='icon icon-product'></i> <strong>" + product +"</strong> " + linkedProjectsTip +"</td></tr>");
|
||||
for(var j in data.multiLinkedProjects)
|
||||
{
|
||||
if(i == j)
|
||||
{
|
||||
html = ''
|
||||
for(k in data.multiLinkedProjects[j])
|
||||
{
|
||||
var project = data.multiLinkedProjects[j][k];
|
||||
html += "<p><i class='icon icon-project'></i> " + project +"</p>";
|
||||
}
|
||||
$('#promptTable').append("<tr><td style='padding-left:40px'>" + html + "</td></tr>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
changed = false;
|
||||
$('#promptBox').modal({show: true});
|
||||
}
|
||||
|
||||
if(!changed) $("#parent").val(oldParent).trigger("chosen:updated");
|
||||
oldParent = $('#parent').val();
|
||||
});
|
||||
});
|
||||
|
||||
adjustProductBoxMargin();
|
||||
adjustPlanBoxMargin();
|
||||
|
||||
/* If the story of the product which linked the execution under the project, you don't allow to remove the product. */
|
||||
$("#productsBox select").each(function()
|
||||
{
|
||||
var isExisted = $.inArray($(this).attr('data-last'), unmodifiableProducts);
|
||||
if(isExisted != -1)
|
||||
{
|
||||
$('#longTimeBox').addClass('hidden');
|
||||
$('#longTimeBox').find('#longTime').prop('checked', false).change();
|
||||
$(this).prop('disabled', true).trigger("chosen:updated");
|
||||
$(this).siblings('div').find('span').attr('title', tip);
|
||||
}
|
||||
});
|
||||
|
||||
$('#longTime').change(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
$('#end').val('').attr('disabled', 'disabled');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#end').val(endDate).removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
$('#isCat').change();
|
||||
});
|
||||
|
||||
/**
|
||||
* Set aclList.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setAclList(projectID)
|
||||
{
|
||||
if(projectID != 0)
|
||||
{
|
||||
$('.aclBox').html($('#programAcl').html());
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.aclBox').html($('#projectAcl').html());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,6 @@ function deleteItem(obj)
|
||||
function setDeptUsers(obj)
|
||||
{
|
||||
dept = $(obj).val(); // Get dept ID.
|
||||
link = createLink('project', 'PRJManageMembers', 'projectID=' + projectID + '&dept=' + dept); // Create manageMembers link.
|
||||
link = createLink('project', 'manageMembers', 'projectID=' + projectID + '&dept=' + dept); // Create manageMembers link.
|
||||
location.href=link;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
$(function()
|
||||
{
|
||||
$('input[name^="showClosed"]').click(function()
|
||||
{
|
||||
var showClosed = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('showClosed', showClosed, {expires:config.cookieLife, path:config.webRoot});
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
@@ -1,12 +0,0 @@
|
||||
$(function()
|
||||
{
|
||||
$('#PRJMine1').click(function()
|
||||
{
|
||||
var PRJMine = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('PRJMine', PRJMine, {expires:config.cookieLife, path:config.webRoot});
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
|
||||
$('#project' + projectID).addClass('active');
|
||||
$(".tree .active").parent('li').addClass('active');
|
||||
@@ -1,238 +0,0 @@
|
||||
$(function()
|
||||
{
|
||||
$('#copyProjects a').click(function()
|
||||
{
|
||||
setCopyProject($(this).data('id'));
|
||||
$('#copyProjectModal').modal('hide')
|
||||
});
|
||||
|
||||
setAclList($("#parent").val());
|
||||
|
||||
if(typeof(currentPlanID) == 'undefined')
|
||||
{
|
||||
$('#productsBox select[id^="products"]').each(function()
|
||||
{
|
||||
var branchID = 0;
|
||||
if($(this).closest('.input-group').find('select[id^="branch"]').size() > 0)
|
||||
{
|
||||
var branchID = $(this).closest('.input-group').find('select[id^="branch"]').val();
|
||||
}
|
||||
loadPlans($(this), branchID);
|
||||
});
|
||||
}
|
||||
|
||||
$('[data-toggle="popover"]').popover();
|
||||
});
|
||||
|
||||
/**
|
||||
* Set parent project.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setParentProgram()
|
||||
{
|
||||
var parentProgram = $("#parent").val();
|
||||
location.href = createLink('project', 'PRJCreate', 'model=' + model + '&projectID=' + parentProgram + '&from=' + from);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set copy project.
|
||||
*
|
||||
* @param int $copyProjectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setCopyProject(copyProjectID)
|
||||
{
|
||||
location.href = createLink('project', 'PRJCreate', 'model=' + model + '&projectID=' + projectID + '&from=' + from + '©ProjectID=' + copyProjectID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add new product.
|
||||
*
|
||||
* @param obj $obj
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function addNewProduct(obj)
|
||||
{
|
||||
if($(obj).attr('checked'))
|
||||
{
|
||||
$('#productName').removeAttr('disabled', true);
|
||||
$('#productName').closest('tr').removeClass('hidden');
|
||||
$('#plansBox .col-sm-4').find('select').attr('disabled', true).trigger("chosen:updated");
|
||||
$('#plansBox').closest('tr').addClass('hidden');
|
||||
$('#productsBox .col-sm-4 .input-group').find('select').attr('disabled', true).trigger("chosen:updated");
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#productName').attr('disabled', true);
|
||||
$('#productName').closest('tr').addClass('hidden');
|
||||
$('#plansBox .col-sm-4').find('select').removeAttr('disabled', true).trigger("chosen:updated");
|
||||
$('#plansBox').closest('tr').removeClass('hidden');
|
||||
$('#productsBox .col-sm-4 .input-group').find('select').removeAttr('disabled').trigger("chosen:updated");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set access control box.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setAclList(projectID)
|
||||
{
|
||||
if(projectID != 0)
|
||||
{
|
||||
$('.aclBox').html($('#PGMAcl').html());
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.aclBox').html($('#PRJAcl').html());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load branches.
|
||||
*
|
||||
* @param int $product
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadBranches(product)
|
||||
{
|
||||
$('#productsBox select').each(function()
|
||||
{
|
||||
var $product = $(product);
|
||||
if($product.val() != 0 && $product.val() == $(this).val() && $product.attr('id') != $(this).attr('id'))
|
||||
{
|
||||
alert(errorSameProducts);
|
||||
$product.val(0);
|
||||
$product.trigger("chosen:updated");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if($('#productsBox .input-group:last select:first').val() != 0)
|
||||
{
|
||||
var length = $('#productsBox .input-group').size();
|
||||
var $html = $('#productsBox .col-sm-4:last').html();
|
||||
$('#productsBox .col-sm-4:last').find('.input-group-addon').remove();
|
||||
$('#productsBox .row').append('<div class="col-sm-4">' + $html + '</div>');
|
||||
if($('#productsBox .input-group:last select').size() >= 2) $('#productsBox .input-group:last select:last').remove();
|
||||
$('#productsBox .input-group:last .chosen-container').remove();
|
||||
$('#productsBox .input-group:last select:first').attr('name', 'products[' + length + ']').attr('id', 'products' + length);
|
||||
$('#productsBox .input-group:last .chosen').chosen();
|
||||
|
||||
adjustProductBoxMargin();
|
||||
}
|
||||
|
||||
var $inputgroup = $(product).closest('.input-group');
|
||||
if($inputgroup.find('select').size() >= 2) $inputgroup.removeClass('has-branch').find('select:last').remove();
|
||||
if($inputgroup.find('.chosen-container').size() >= 2) $inputgroup.find('.chosen-container:last').remove();
|
||||
|
||||
var index = $inputgroup.find('select:first').attr('id').replace('products' , '');
|
||||
$.get(createLink('branch', 'ajaxGetBranches', "productID=" + $(product).val()), function(data)
|
||||
{
|
||||
if(data)
|
||||
{
|
||||
$inputgroup.addClass('has-branch').append(data);
|
||||
$inputgroup.find('select:last').attr('name', 'branch[' + index + ']').attr('id', 'branch' + index).attr('onchange', "loadPlans('#products" + index + "', this.value)").chosen();
|
||||
}
|
||||
});
|
||||
|
||||
loadPlans(product);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load plans.
|
||||
*
|
||||
* @param obj $product
|
||||
* @param int $branchID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadPlans(product, branchID)
|
||||
{
|
||||
if($('#plansBox').size() == 0) return false;
|
||||
|
||||
var productID = $(product).val();
|
||||
var branchID = typeof(branchID) == 'undefined' ? 0 : branchID;
|
||||
var index = $(product).attr('id').replace('products', '');
|
||||
|
||||
if(productID != 0)
|
||||
{
|
||||
if(typeof(planID) == 'undefined') planID = 0;
|
||||
planID = $("select#plans" + productID).val() != '' ? $("select#plans" + productID).val() : planID;
|
||||
$.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + ((config.currentMethod == 'create' || config.currentMethod == 'edit') ? 'unexpired' : '')), function(data)
|
||||
{
|
||||
if(data)
|
||||
{
|
||||
if($("div#plan" + index).size() == 0) $("#plansBox .row").append('<div class="col-sm-4" id="plan' + index + '"></div>');
|
||||
$("div#plan" + index).html(data).find('select').attr('name', 'plans[' + productID + ']').attr('id', 'plans' + productID).chosen();
|
||||
|
||||
adjustPlanBoxMargin();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust product box margin.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function adjustProductBoxMargin()
|
||||
{
|
||||
var productRows = Math.ceil($('#productsBox > .row > .col-sm-4').length / 3);
|
||||
if(productRows > 1)
|
||||
{
|
||||
for(i = 1; i <= productRows - 1; i++)
|
||||
{
|
||||
$('#productsBox .col-sm-4:lt(' + (i * 3) + ')').css('margin-bottom', '10px');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust plan box margin.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function adjustPlanBoxMargin()
|
||||
{
|
||||
var planRows = Math.ceil($('#plansBox > .row > .col-sm-4').length / 3);
|
||||
if(planRows > 1)
|
||||
{
|
||||
for(j = 1; j <= planRows - 1; j++)
|
||||
{
|
||||
$('#plansBox .col-sm-4:lt(' + (j * 3) + ')').css('margin-bottom', '10px');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fuzzy search projects by project name.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
$('#projectName').on('keyup', function()
|
||||
{
|
||||
var name = $(this).val();
|
||||
name = name.replace(/\s+/g, '');
|
||||
link = createLink('project', 'ajaxGetCopyProjects');
|
||||
$.post(link, {name: name, cpoyProjectID : copyProjectID}, function(data)
|
||||
{
|
||||
$('#copyProjects').html(data);
|
||||
$('#copyProjects a').click(function()
|
||||
{
|
||||
setCopyProject($(this).data('id'));
|
||||
$('#copyProjectModal').modal('hide');
|
||||
});
|
||||
})
|
||||
})
|
||||
@@ -1,86 +0,0 @@
|
||||
$(function()
|
||||
{
|
||||
$('#parent').change(function()
|
||||
{
|
||||
var projectID = $(this).val();
|
||||
|
||||
/* Determine whether the project can change the project set. */
|
||||
link = createLink('project', 'ajaxCheckProduct', 'projectID=' + projectID + '&projectID=' + projectID);
|
||||
$.getJSON(link, function(data)
|
||||
{
|
||||
var changed = true;
|
||||
|
||||
if(data && data.result)
|
||||
{
|
||||
changed = confirm(data.message);
|
||||
if(changed)
|
||||
{
|
||||
$('#productsBox select').prop('disabled', true).trigger("chosen:updated");
|
||||
}
|
||||
}
|
||||
|
||||
if(data && !data.result)
|
||||
{
|
||||
$('#promptTable tbody tr').remove();
|
||||
for(var i in data.message)
|
||||
{
|
||||
var product = data.message[i];
|
||||
$('#promptTable').append("<tr><td><i class='icon icon-product'></i> <strong>" + product +"</strong> " + linkedProjectsTip +"</td></tr>");
|
||||
for(var j in data.multiLinkedProjects)
|
||||
{
|
||||
if(i == j)
|
||||
{
|
||||
html = ''
|
||||
for(k in data.multiLinkedProjects[j])
|
||||
{
|
||||
var project = data.multiLinkedProjects[j][k];
|
||||
html += "<p><i class='icon icon-project'></i> " + project +"</p>";
|
||||
}
|
||||
$('#promptTable').append("<tr><td style='padding-left:40px'>" + html + "</td></tr>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
changed = false;
|
||||
$('#promptBox').modal({show: true});
|
||||
}
|
||||
|
||||
if(!changed) $("#parent").val(oldParent).trigger("chosen:updated");
|
||||
oldParent = $('#parent').val();
|
||||
});
|
||||
});
|
||||
|
||||
adjustProductBoxMargin();
|
||||
adjustPlanBoxMargin();
|
||||
|
||||
/* If the story of the product which linked the execution under the project, you don't allow to remove the product. */
|
||||
$("#productsBox select").each(function()
|
||||
{
|
||||
var isExisted = $.inArray($(this).attr('data-last'), unmodifiableProducts);
|
||||
if(isExisted != -1)
|
||||
{
|
||||
$(this).prop('disabled', true).trigger("chosen:updated");
|
||||
$(this).siblings('div').find('span').attr('title', tip);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Set aclList.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setAclList(projectID)
|
||||
{
|
||||
if(projectID != 0)
|
||||
{
|
||||
$('.aclBox').html($('#PGMAcl').html());
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.aclBox').html($('#PRJAcl').html());
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<?php echo $normalProjectsHtml;?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<?php echo html::a(helper::createLink('project', 'PRJBrowse', 'projectID=0&status=all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->project->all, '', 'class="not-list-item"'); ?>
|
||||
<?php echo html::a(helper::createLink('project', 'browse', 'projectID=0&status=all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->project->all, '', 'class="not-list-item"'); ?>
|
||||
<a class='pull-right toggle-right-col not-list-item'><?php echo $lang->project->doneProjects;?><i class='icon icon-angle-right'></i></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php js::set('projectID', $projectID);?>
|
||||
<?php js::set('module', $module);?>
|
||||
<?php js::set('method', $method);?>
|
||||
<?php
|
||||
foreach($projects as $project) $projectNames[] = $project->name;
|
||||
$projectsPinYin = common::convert2Pinyin($projectNames);
|
||||
?>
|
||||
<div class="table-row">
|
||||
<div class="table-col col-left">
|
||||
<div class='list-group'>
|
||||
<?php
|
||||
echo $this->project->getPGMTreeMenu();
|
||||
?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<div class='pull-right'>
|
||||
<?php echo html::checkbox('showClosed', array('1' => $lang->project->PGMShowClosed), '', $this->cookie->showClosed ? 'checked=checked' : '');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.tree li.has-list.open:before {border-left: none;}
|
||||
#projectTree li {padding: 0 0 0 8px;}
|
||||
#projectTree li.has-list {padding-left: 20px;}
|
||||
#projectTree li > a {display: block; padding: 5px 0; border-radius: 2px; padding-left: 6px; height: 30px;}
|
||||
#projectTree li > a > span {display: inline-block;}
|
||||
#projectTree li > a > span + span {margin-left: 8px;}
|
||||
#projectTree li.selected > a {background-color: #E8F3FC;}
|
||||
#projectTree li.selected > a > span.title {color: #006AF1;}
|
||||
#projectTree .label-id {border-color: #cbd0db; color: #7d8599}
|
||||
#projectTree .label.label-type {background: #fff; border: 1px solid #7d8599; color:#7d8599}
|
||||
|
||||
#projectTree li > a > span.title {color: #3C4353; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;}
|
||||
#projectTree li > a > span.user {color: #838a9d;}
|
||||
#projectTree li > a > span.user > .icon-person {font-size: 14px; position: relative; top: -1px; color: #a6aab8}
|
||||
|
||||
#projectTree li > .list-toggle {transform: rotate(0deg); width: 16px; height: 16px; border: 4px solid #a6aab8; border-radius: 2px; top: 7px;}
|
||||
#projectTree li > .list-toggle:before {content: ' '; display: block; position: absolute; border: 1px solid #a6aab8; top: 2px; left: -3px; right: -3px; bottom: 2px; min-width: 0; transition: all .2s;}
|
||||
#projectTree li > .list-toggle:hover:before,
|
||||
#projectTree li > .list-toggle:hover {border-color: #006AF1;}
|
||||
#projectTree li.open > .list-toggle {width: 12px; height: 12px; top: 9px; background-color: #a6aab8; border-width: 3px; left: 3px;}
|
||||
#projectTree li.open > .list-toggle:before {border: none; height: 2px; width: 6px; left: 0; top: 2px; background: #fff;}
|
||||
#projectTree li.open > .list-toggle:hover {background: #006AF1;}
|
||||
|
||||
#projectTree ul > li:after {display: block; position: absolute; content: ' '; border-top: 1px dashed #cbd0db; top: 14px; left: -12px; z-index: 1; width: 10px;}
|
||||
#projectTree ul > li:before,
|
||||
#projectTree ul > li.has-list:before {background: none; content: ' '; display: block; position: absolute; width: auto; height: auto; border: none; border-left: 1px dashed #cbd0db; top: -13px; bottom: 12px; left: -12px;}
|
||||
#projectTree ul > li:last-child:before {bottom: auto; height: 29px;}
|
||||
#projectTree ul > li:first-child:before {top: -9px;}
|
||||
#projectTree ul > li.has-list:first-child:before {top: -13px;}
|
||||
#projectTree ul > li.tree-single-item:before {height: 23px;}
|
||||
#projectTree ul > li.has-list:after {width: 14px;}
|
||||
#projectTree ul > li.item-meas a.selected{color: #0c64eb;}
|
||||
#showClosed1 + label{color: #3c4353}
|
||||
</style>
|
||||
<script>
|
||||
$('#projectTree').tree();
|
||||
$(function()
|
||||
{
|
||||
$('input[name^="showClosed"]').click(function()
|
||||
{
|
||||
var showClosed = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('showClosed', showClosed, {expires:config.cookieLife, path:config.webRoot});
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -14,19 +14,19 @@
|
||||
<?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;?>
|
||||
<?php $requiredFields = $config->project->edit->requiredFields;?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->project->PRJBatchEdit;?></h2>
|
||||
<h2><?php echo $lang->project->batchEdit;?></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-200px'><?php echo $lang->project->parent;?></th>
|
||||
<th class='c-name required'><?php echo $lang->project->name;?></th>
|
||||
<th class="w-150px <?php echo strpos($requiredFields, 'PM') !== false ? 'required' : '';?>"> <?php echo $lang->project->PM;?></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>
|
||||
@@ -34,7 +34,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($projects as $projectID => $project):?>
|
||||
<?php $aclList = $project->parent ? $lang->project->PGMPRJAcls : $lang->project->PRJAcls;?>
|
||||
<?php $aclList = $project->parent ? $lang->program->aclList : $lang->project->aclList;?>
|
||||
<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>
|
||||
@@ -46,7 +46,7 @@
|
||||
<td>
|
||||
<?php
|
||||
$disabledEnd = $project->end == LONG_TIME ? 'disabled' : '';
|
||||
$end = $project->end == LONG_TIME ? $lang->project->PRJLongTime : $project->end;
|
||||
$end = $project->end == LONG_TIME ? $lang->project->longTime : $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);
|
||||
?>
|
||||
|
||||
@@ -21,7 +21,7 @@ js::set('browseType', $browseType);
|
||||
<div id="sidebarHeader">
|
||||
<div class="title">
|
||||
<?php echo empty($project) ? $lang->project->common : $project->name;?>
|
||||
<?php if($projectID) echo html::a(inLink('PRJBrowse', 'projectID=0'), "<i class='icon icon-sm icon-close'></i>", '', 'class="text-muted"');?>
|
||||
<?php if($projectID) echo html::a(inLink('browse', 'projectID=0'), "<i class='icon icon-sm icon-close'></i>", '', 'class="text-muted"');?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -30,9 +30,9 @@ js::set('browseType', $browseType);
|
||||
<?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 echo html::a(inlink('browse', "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' : '');?>
|
||||
<?php echo html::checkbox('projectMine', array('1' => $lang->project->mine), '', $this->cookie->projectMine ? 'checked=checked' : '');?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(isset($this->config->maxVersion)):?>
|
||||
@@ -49,9 +49,9 @@ js::set('browseType', $browseType);
|
||||
<div id="sidebar" class="side-col">
|
||||
<div class="sidebar-toggle"><i class="icon icon-angle-left"></i></div>
|
||||
<div class="cell">
|
||||
<?php echo $PRJTree;?>
|
||||
<?php echo $projectTree;?>
|
||||
<div class="text-center">
|
||||
<?php common::printLink('project', 'PRJProgramTitle', '', $lang->project->moduleSetting, '', "class='btn btn-info btn-wide iframe'", true, true);?>
|
||||
<?php common::printLink('project', 'projectProgramTitle', '', $lang->project->moduleSetting, '', "class='btn btn-info btn-wide iframe'", true, true);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,16 +60,16 @@ js::set('browseType', $browseType);
|
||||
<?php if(empty($projectStats)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->project->noPRJ;?></span>
|
||||
<span class="text-muted"><?php echo $lang->project->empty;?></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 common::printLink('project', 'createGuide', "projectID=$projectID", '<i class="icon icon-plus"></i>' . $lang->project->create, '', '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 common::printLink('project', 'create', '', '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info btn-wide"');?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<form class='main-table' id='PRJForm' method='post' data-ride="table">
|
||||
<form class='main-table' id='projectForm' method='post' data-ride="table">
|
||||
<div class="table-header fixed-right">
|
||||
<nav class="btn-toolbar pull-right"></nav>
|
||||
</div>
|
||||
@@ -78,13 +78,13 @@ js::set('browseType', $browseType);
|
||||
$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');?>
|
||||
<?php $canBatchEdit = $this->config->systemMode == 'new' ? common::hasPriv('project', 'batchEdit') : common::hasPriv('project', 'batchEdit');?>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
foreach($setting as $value)
|
||||
{
|
||||
if($value->id == 'PRJStatus' and $browseType !== 'all') $value->show = false;
|
||||
if($value->id == 'status' and $browseType !== 'all') $value->show = false;
|
||||
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
|
||||
}
|
||||
?>
|
||||
@@ -92,7 +92,7 @@ js::set('browseType', $browseType);
|
||||
</thead>
|
||||
<tbody class="sortable" id='projectTableList'>
|
||||
<?php foreach($projectStats as $project):?>
|
||||
<?php $project->from = 'PRJ';?>
|
||||
<?php $project->from = 'project';?>
|
||||
<tr data-id="<?php echo $project->id;?>">
|
||||
<?php foreach($setting as $value) $this->project->printCell($value, $project, $users, $projectID);?>
|
||||
</tr>
|
||||
@@ -107,7 +107,7 @@ js::set('browseType', $browseType);
|
||||
<?php
|
||||
if($canBatchEdit)
|
||||
{
|
||||
$actionLink = $this->config->systemMode == 'new' ? $this->createLink('project', 'PRJBatchEdit', 'from=prjbrowse') : $this->createLink('project', 'batchEdit');
|
||||
$actionLink = $this->config->systemMode == 'new' ? $this->createLink('project', 'batchEdit', 'from=prjbrowse') : $this->createLink('project', 'batchEdit');
|
||||
$misc = "data-form-action='$actionLink'";
|
||||
echo html::commonButton($lang->edit, $misc);
|
||||
}
|
||||
|
||||
@@ -19,39 +19,39 @@
|
||||
<?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;?>
|
||||
<?php js::set('longTime', $lang->project->longTime);?>
|
||||
<?php $requiredFields = $config->project->create->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>
|
||||
<h2><?php echo $lang->project->create . ' - ' . 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>
|
||||
<button type='button' class='btn btn-link' data-toggle='modal' data-target='#copyProjectModal'><?php echo html::icon($lang->icons['copy'], 'muted') . ' ' . $lang->project->copy;?></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>
|
||||
<th class='w-120px'><?php echo $lang->project->parent;?></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>
|
||||
<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->program->tips;?>"></icon>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->PRJName;?></th>
|
||||
<th><?php echo $lang->project->name;?></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>
|
||||
<th><?php echo $lang->project->PM;?></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>
|
||||
<th><?php echo $lang->project->budget;?></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 $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->parentBudget . zget($lang->project->currencySymbol, $parentProgram->budgetUnit) . $budgetLeft : '';?>
|
||||
<?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>
|
||||
@@ -138,14 +138,14 @@
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->PRJDesc;?></th>
|
||||
<th><?php echo $lang->project->desc;?></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>
|
||||
<td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $lang->project->aclList, $acl, "onclick='setWhite(this.value);'", 'block'));?></td>
|
||||
</tr>
|
||||
<tr class="hidden" id="whitelistBox">
|
||||
<th><?php echo $lang->whitelist;?></th>
|
||||
@@ -155,7 +155,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->auth;?></th>
|
||||
<td colspan='3'><?php echo html::radio('auth', $lang->project->PRJAuthList, $auth, '', 'block');?></td>
|
||||
<td colspan='3'><?php echo html::radio('auth', $lang->project->authList, $auth, '', 'block');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='4' class='text-center form-actions'>
|
||||
@@ -196,10 +196,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='PRJAcl' class='hidden'>
|
||||
<?php echo nl2br(html::radio('acl', $lang->project->PRJAclList, $acl, "onclick='setWhite(this.value);'", 'block'));?>
|
||||
<div id='projectAcl' class='hidden'>
|
||||
<?php echo nl2br(html::radio('acl', $lang->project->aclList, $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 id='programAcl' class='hidden'>
|
||||
<?php echo nl2br(html::radio('acl', $lang->program->aclList, $acl, "onclick='setWhite(this.value);'", 'block'));?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
<div class='row'>
|
||||
<div class='col-xs-6'>
|
||||
<div class='project-type text-center'>
|
||||
<?php echo html::a($this->createLink("project", "PRJCreate", "model=scrum&projectID=$projectID&from=$from"), "<img class='project-type-img' data-type='scrum' src='{$config->webRoot}theme/default/images/main/scrum.png'>", '', $group)?>
|
||||
<?php echo html::a($this->createLink("project", "create", "model=scrum&projectID=$projectID&from=$from"), "<img class='project-type-img' data-type='scrum' src='{$config->webRoot}theme/default/images/main/scrum.png'>", '', $group)?>
|
||||
<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'>
|
||||
<?php echo html::a($this->createLink("project", "PRJCreate", "model=waterfall&projectID=$projectID&from=$from"), "<img class='project-type-img' data-type='waterfall' src='{$config->webRoot}theme/default/images/main/waterfall.png'>", '', $group)?>
|
||||
<?php echo html::a($this->createLink("project", "create", "model=waterfall&projectID=$projectID&from=$from"), "<img class='project-type-img' data-type='waterfall' src='{$config->webRoot}theme/default/images/main/waterfall.png'>", '', $group)?>
|
||||
<h3><?php echo $lang->project->waterfall; ?></h3>
|
||||
<p><?php echo $lang->project->waterfallTitle; ?></p>
|
||||
</div>
|
||||
|
||||
@@ -17,39 +17,39 @@
|
||||
<?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('longTime', $lang->project->longTime);?>
|
||||
<?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;?>
|
||||
<?php $aclList = $project->parent ? $lang->program->aclList : $lang->project->aclList;?>
|
||||
<?php $requiredFields = $config->project->edit->requiredFields;?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->project->PRJEdit;?></h2>
|
||||
<h2><?php echo $lang->project->edit;?></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>
|
||||
<th class='w-120px'><?php echo $lang->program->parent;?></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>
|
||||
<th><?php echo $lang->project->name;?></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>
|
||||
<th><?php echo $lang->project->PM;?></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>
|
||||
<th><?php echo $lang->project->budget;?></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 $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->parentBudget . 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>
|
||||
@@ -74,7 +74,7 @@
|
||||
<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;
|
||||
$end = $project->end == LONG_TIME ? $lang->project->longTime : $project->end;
|
||||
echo html::input('end', $end, "class='form-control form-date' onchange='computeWorkDays();' $disabledEnd placeholder='" . $lang->project->end . "' required");
|
||||
?>
|
||||
</div>
|
||||
@@ -136,7 +136,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->PRJDesc;?></th>
|
||||
<th><?php echo $lang->project->desc;?></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>
|
||||
@@ -153,7 +153,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->auth;?></th>
|
||||
<td colspan='3'><?php echo html::radio('auth', $lang->project->PRJAuthList, $project->auth, '', 'block');?></td>
|
||||
<td colspan='3'><?php echo html::radio('auth', $lang->project->authList, $project->auth, '', 'block');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='4' class='text-center form-actions'>
|
||||
@@ -168,11 +168,11 @@
|
||||
</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 id='projectAcl' class='hidden'>
|
||||
<?php echo nl2br(html::radio('acl', $lang->project->aclList, $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 id='ProgramAcl' class='hidden'>
|
||||
<?php echo nl2br(html::radio('acl', $lang->project->aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?>
|
||||
</div>
|
||||
<div class="modal fade" id="promptBox">
|
||||
<div class="modal-dialog mw-600px">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<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"');?>
|
||||
<?php if(common::hasPriv('project', 'createGroup')) echo html::a($this->createLink('project', 'createGroup', "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'>
|
||||
@@ -44,12 +44,12 @@
|
||||
<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¶m=$group->id", $group, 'list', 'lock');?>
|
||||
<?php common::printIcon('project', 'manageView', "groupID=$group->id&projectID=$projectID&projectID=$projectID", $group, 'list', 'eye', '', $disabled);?>
|
||||
<?php common::printIcon('project', 'managePriv', "type=byGroup¶m=$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 common::printIcon('project', 'manageGroupMember', "groupID=$group->id", $group, 'list', 'persons', '', 'iframe', 'yes', "data-width='90%'");?>
|
||||
<?php common::printIcon('project', 'editGroup', "groupID=$group->id", $group, 'list', 'edit', '', 'iframe', 'yes', "data-width='550'");?>
|
||||
<?php common::printIcon('project', 'copyGroup', "groupID=$group->id", $group, 'list', 'copy', '', "iframe $disabled", 'yes', "data-width='550'");?>
|
||||
<?php
|
||||
if(common::hasPriv('group', 'delete') and $group->role != 'limited')
|
||||
{
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
?>
|
||||
<?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>
|
||||
<h4 class="modal-title"><i class="icon-cog"></i><?php echo $lang->project->moduleSetting;?></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>
|
||||
<td class="w-180px"><?php echo $lang->project->moduleOpen;?></td>
|
||||
<td><?php echo html::radio('programTitle', $lang->project->programTitle, $status);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="text-center"><?php echo html::submitButton();?></td>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<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>
|
||||
<li><?php common::printLink('project', 'manageMembers', "projectID=$project->id", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@@ -51,7 +51,7 @@
|
||||
<?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>
|
||||
<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->PM;?>)</span></div>
|
||||
<?php endif;?>
|
||||
<?php if($project->PO):?>
|
||||
<?php $i--;?>
|
||||
@@ -75,7 +75,7 @@
|
||||
<?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> " . $lang->project->manageMembers, '', "class='text-muted'");?>
|
||||
<?php common::printLink('project', 'manageMembers', "projectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->project->manageMembers, '', "class='text-muted'");?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -95,16 +95,16 @@
|
||||
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);
|
||||
common::printIcon('project', 'start', "projectID=$project->id", $project, 'button', 'play', '', 'iframe', true, '', $lang->project->start);
|
||||
common::printIcon('project', 'activate', "projectID=$project->id", $project, 'button', 'magic', '', 'iframe', true, '', $lang->project->activate);
|
||||
common::printIcon('project', 'suspend', "projectID=$project->id", $project, 'button', 'pause', '', 'iframe', true, '', $lang->project->suspend);
|
||||
common::printIcon('project', 'close', "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);
|
||||
common::printIcon('project', 'edit', $params, $project, 'button', 'edit', '', '', '', '', $lang->edit);
|
||||
common::printIcon('project', 'delete', $params, $project, 'button', 'trash', 'hiddenwin', '', '', '', $lang->delete);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -122,7 +122,7 @@
|
||||
<?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>
|
||||
<span class="label label-primary label-outline"><?php echo zget($lang->project->lifeTimeList, $project->lifetime);?></span>
|
||||
<?php if(isset($project->delay)):?>
|
||||
<span class="label label-danger label-outline"><?php echo $lang->project->delayed;?></span>
|
||||
<?php else:?>
|
||||
@@ -220,7 +220,7 @@
|
||||
<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>
|
||||
<p><?php echo $lang->project->aclList[$project->acl];?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->printExtendFields($project, 'div', "position=right&inForm=0&inCell=1");?>
|
||||
|
||||
Reference in New Issue
Block a user