* Fix details.
This commit is contained in:
+18
-24
@@ -27,47 +27,41 @@ $config->duplicateTime = 60;
|
||||
|
||||
/* Product common list. */
|
||||
$config->productCommonList['zh-cn'][0] = '产品';
|
||||
$config->productCommonList['zh-cn'][1] = '项目';
|
||||
|
||||
$config->productCommonList['zh-tw'][0] = '產品';
|
||||
$config->productCommonList['zh-tw'][1] = '項目';
|
||||
|
||||
$config->productCommonList['en'][0] = 'Product';
|
||||
$config->productCommonList['en'][1] = 'Project';
|
||||
|
||||
$config->productCommonList['de'][0] = 'Produkt';
|
||||
$config->productCommonList['de'][1] = 'Projekt';
|
||||
|
||||
$config->productCommonList['fr'][0] = 'Product';
|
||||
$config->productCommonList['fr'][1] = 'Projet';
|
||||
|
||||
$config->productCommonList['vi'][0] = 'Sản phẩm';
|
||||
$config->productCommonList['vi'][1] = 'Dự án';
|
||||
|
||||
/* Project common list. */
|
||||
$config->projectCommonList['zh-cn'][0] = '项目';
|
||||
$config->projectCommonList['zh-cn'][1] = '迭代';
|
||||
$config->projectCommonList['zh-cn'][2] = '冲刺';
|
||||
$config->projectCommonList['zh-cn'][0] = '迭代';
|
||||
$config->projectCommonList['zh-cn'][1] = '冲刺';
|
||||
$config->projectCommonList['zh-cn'][2] = '阶段';
|
||||
|
||||
$config->projectCommonList['zh-tw'][0] = '項目';
|
||||
$config->projectCommonList['zh-tw'][1] = '迭代';
|
||||
$config->projectCommonList['zh-tw'][2] = '冲刺';
|
||||
$config->projectCommonList['zh-tw'][0] = '迭代';
|
||||
$config->projectCommonList['zh-tw'][1] = '冲刺';
|
||||
$config->projectCommonList['zh-tw'][2] = '階段';
|
||||
|
||||
$config->projectCommonList['en'][0] = 'Project';
|
||||
$config->projectCommonList['en'][1] = 'Iteration';
|
||||
$config->projectCommonList['en'][2] = 'Sprint';
|
||||
$config->projectCommonList['en'][0] = 'Iteration';
|
||||
$config->projectCommonList['en'][1] = 'Sprint';
|
||||
$config->projectCommonList['en'][2] = 'Stage';
|
||||
|
||||
$config->projectCommonList['de'][0] = 'Projekt';
|
||||
$config->projectCommonList['de'][1] = 'Iteration';
|
||||
$config->projectCommonList['de'][2] = 'Sprint';
|
||||
$config->projectCommonList['de'][0] = 'Iteration';
|
||||
$config->projectCommonList['de'][1] = 'Sprint';
|
||||
$config->projectCommonList['de'][2] = 'Bühne';
|
||||
|
||||
$config->projectCommonList['fr'][0] = 'Projet';
|
||||
$config->projectCommonList['fr'][1] = 'Iteration';
|
||||
$config->projectCommonList['fr'][2] = 'Sprint';
|
||||
$config->projectCommonList['fr'][0] = 'Iteration';
|
||||
$config->projectCommonList['fr'][1] = 'Sprint';
|
||||
$config->projectCommonList['fr'][2] = 'Phase';
|
||||
|
||||
$config->projectCommonList['vi'][0] = 'Dự án';
|
||||
$config->projectCommonList['vi'][1] = 'Lặp lại';
|
||||
$config->projectCommonList['vi'][2] = 'Sprint';
|
||||
$config->projectCommonList['vi'][0] = 'Lặp lại';
|
||||
$config->projectCommonList['vi'][1] = 'Sprint';
|
||||
$config->projectCommonList['vi'][2] = 'Giai đoạn';
|
||||
|
||||
/* Story common list. */
|
||||
$config->storyCommonList['zh-cn'][0] = '需求';
|
||||
|
||||
@@ -95,44 +95,6 @@ CREATE TABLE `zt_designspec` (
|
||||
UNIQUE KEY `design` (`design`,`version`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
<<<<<<< HEAD
|
||||
-- DROP TABLE IF EXISTS `zt_issue`;
|
||||
CREATE TABLE `zt_issue` (
|
||||
`id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`program` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`commit` varchar(30) NOT NULL,
|
||||
`project` mediumint(9) NOT NULL DEFAULT '0',
|
||||
`name` varchar(255) NOT NULL,
|
||||
`parent` mediumint(8) unsigned NOT NULL,
|
||||
`status` varchar(30) NOT NULL,
|
||||
`subStatus` varchar(30) NOT NULL,
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`editedBy` varchar(30) NOT NULL,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`commitBy` varchar(30) NOT NULL,
|
||||
`commitDate` datetime NOT NULL,
|
||||
`assignedTo` varchar(30) NOT NULL,
|
||||
`assignedBy` varchar(30) NOT NULL,
|
||||
`assignedDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`story` char(30) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`version` smallint(6) NOT NULL,
|
||||
`type` char(30) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `zt_designspec` (
|
||||
`design` mediumint(8) NOT NULL,
|
||||
`version` smallint(6) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`files` varchar(255) NOT NULL,
|
||||
UNIQUE KEY `design` (`design`,`version`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- DROP TABLE IF EXISTS `zt_issue`;
|
||||
CREATE TABLE `zt_issue` (
|
||||
`id` mediumint(8) UNSIGNED NOT NULL,
|
||||
|
||||
@@ -137,6 +137,12 @@ class router extends baseRouter
|
||||
if($setting->key == 'urAndSr') $config->urAndSr = $setting->value;
|
||||
}
|
||||
|
||||
if($this->session->program)
|
||||
{
|
||||
$template = $this->dbh->query('SELECT template FROM' . TABLE_PROJECT . "WHERE id = {$this->session->program}")->fetch();
|
||||
if($template->template == 'cmmi') $projectCommon = 2;
|
||||
}
|
||||
|
||||
$config->storyCommon = $storyCommon;
|
||||
|
||||
/* Set productCommon, projectCommon, storyCommon and hourCommon. Default english lang. */
|
||||
|
||||
@@ -134,7 +134,7 @@ $lang->dividerMenu = ',admin,';
|
||||
$lang->menu = new stdclass();
|
||||
//$lang->menu->program = '主页|program|index';
|
||||
$lang->menu->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->project = '迭代|project|index|locate=no';
|
||||
$lang->menu->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->doc = '文档|doc|index|';
|
||||
$lang->menu->qa = '测试|qa|index';
|
||||
$lang->menu->company = new stdclass();
|
||||
@@ -146,7 +146,7 @@ $lang->system = new stdclass();
|
||||
$lang->system->menu = new stdclass();
|
||||
$lang->system->subMenu = new stdclass();
|
||||
$lang->system->subMenu->setmodel = new stdclass();
|
||||
//$lang->system->menu->setmodel = array('link' => 'cmmi|custom|setcmmi|', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->system->menu->setmodel = array('link' => 'cmmi|custom|setcmmi|', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->system->menu->estimate = array('link' => '估算|custom|estimate|');
|
||||
$lang->system->menu->stage = array('link' => '阶段|stage|browse|', 'subModule' => 'stage');
|
||||
$lang->system->menu->measurement = array('link' => '度量|measurement|settips|', 'subModule' => 'sqlbuilder,measurement,report');
|
||||
@@ -160,19 +160,19 @@ $lang->system->menu->custom = array('link' => '自定义|custom|plan|');
|
||||
$lang->system->subMenu->setmodel->scrum ='scrum|custom|setscrum|';
|
||||
$lang->system->dividerMenu = ',auditcl,subject,';
|
||||
|
||||
//if($this->cookie->systemModel == 'scrum')
|
||||
//{
|
||||
// $lang->system->menu = new stdclass();
|
||||
// $lang->system->subMenu->setmodel = new stdclass();
|
||||
// $lang->system->menu->setmodel = array('link' => 'scrum|custom|setscrum|', 'class' => 'dropdown dropdown-hover');
|
||||
// $lang->system->menu->subject = array('link' => '科目|subject|browse|');
|
||||
// $lang->system->menu->measurement = array('link' => '度量|measurement|settips|', 'subModule' => 'sqlbuilder,measurement');
|
||||
// $lang->system->menu->holiday = array('link' => '节假日|holiday|browse|');
|
||||
//
|
||||
// $lang->system->subMenu->setmodel->cmmi ='cmmi|custom|setcmmi|';
|
||||
// $lang->mainNav->system = '<i class="icon icon-menu-users"></i> 组织|measurement|settips|';
|
||||
// unset($lang->system->dividerMenu);
|
||||
//}
|
||||
if($this->cookie->systemModel == 'scrum')
|
||||
{
|
||||
$lang->system->menu = new stdclass();
|
||||
$lang->system->subMenu->setmodel = new stdclass();
|
||||
$lang->system->menu->setmodel = array('link' => 'scrum|custom|setscrum|', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->system->menu->subject = array('link' => '科目|subject|browse|');
|
||||
$lang->system->menu->holiday = array('link' => '节假日|holiday|browse|');
|
||||
$lang->system->menu->custom = array('link' => '自定义|custom|concept|');
|
||||
|
||||
$lang->system->subMenu->setmodel->cmmi ='cmmi|custom|setcmmi|';
|
||||
$lang->mainNav->system = '<i class="icon icon-menu-users"></i> 组织|measurement|settips|';
|
||||
unset($lang->system->dividerMenu);
|
||||
}
|
||||
|
||||
$lang->stage = new stdclass();
|
||||
$lang->stage->menu = new stdclass();
|
||||
|
||||
@@ -383,6 +383,85 @@ class custom extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display plan or not.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function plan()
|
||||
{
|
||||
$this->lang->custom->menu = new stdclass();
|
||||
$this->lang->navGroup->custom = 'system';
|
||||
|
||||
if(strtolower($this->server->request_method) == "post")
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
$this->loadModel('setting')->setItem('system.custom.planStatus', $data->planStatus);
|
||||
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('custom', 'plan')));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->custom->common . $this->lang->colon . $this->lang->custom->plan;
|
||||
$this->view->position[] = $this->lang->custom->common;
|
||||
$this->view->position[] = $this->lang->custom->plan;
|
||||
$this->view->status = zget($this->config->custom, 'planStatus', 0);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* QC concept.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function concept()
|
||||
{
|
||||
$this->lang->custom->menu = new stdclass();
|
||||
$this->lang->navGroup->custom = 'system';
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$this->custom->setConcept();
|
||||
|
||||
$this->app->loadLang('common');
|
||||
$locate = inlink('concept');
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->custom->concept;
|
||||
$this->view->position[] = $this->lang->custom->concept;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set cmmi model.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setcmmi()
|
||||
{
|
||||
setCookie("systemModel", 'cmmi', $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
die(js::locate($this->createLink('custom', 'estimate')));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set scrum model.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setscrum()
|
||||
{
|
||||
setCookie("systemModel", 'scrum', $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
die(js::locate($this->createLink('custom', 'concept')));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax save custom fields.
|
||||
*
|
||||
|
||||
@@ -34,6 +34,7 @@ $lang->custom->setTips = 'Set Tips';
|
||||
$lang->custom->isRange = 'Is Target Control';
|
||||
$lang->custom->plan = 'Plan';
|
||||
$lang->custom->planStatus = 'Enable Plan';
|
||||
$lang->custom->concept = 'Concept';
|
||||
|
||||
$lang->custom->object['program'] = 'Program';
|
||||
$lang->custom->program->fields['unitList'] = 'Unit List';
|
||||
@@ -167,11 +168,8 @@ $lang->custom->weekendList[2] = '2-Day Off';
|
||||
$lang->custom->weekendList[1] = '1-Day Off';
|
||||
|
||||
$lang->custom->productProject = new stdclass();
|
||||
$lang->custom->productProject->relation['0_0'] = 'Product - Project';
|
||||
$lang->custom->productProject->relation['0_1'] = 'Product - Iteration';
|
||||
$lang->custom->productProject->relation['1_1'] = 'Project - Iteration';
|
||||
$lang->custom->productProject->relation['0_2'] = 'Product - Sprint';
|
||||
$lang->custom->productProject->relation['1_2'] = 'Project - Sprint';
|
||||
$lang->custom->productProject->relation['0_0'] = 'Program - Product - Iteration';
|
||||
$lang->custom->productProject->relation['0_1'] = 'Program - Product - Sprint';
|
||||
|
||||
$lang->custom->productProject->notice = 'Select a concept that fits your team.';
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ $lang->custom->setTips = '设置提示语';
|
||||
$lang->custom->isRange = '是否目标控制范围';
|
||||
$lang->custom->plan = '排期';
|
||||
$lang->custom->planStatus = '是否启用排期';
|
||||
$lang->custom->concept = '概念';
|
||||
|
||||
$lang->custom->object['program'] = '项目';
|
||||
$lang->custom->program->fields['unitList'] = '预算单位';
|
||||
@@ -167,11 +168,8 @@ $lang->custom->weekendList[2] = '双休';
|
||||
$lang->custom->weekendList[1] = '单休';
|
||||
|
||||
$lang->custom->productProject = new stdclass();
|
||||
$lang->custom->productProject->relation['0_0'] = '产品 - 项目';
|
||||
$lang->custom->productProject->relation['0_1'] = '产品 - 迭代';
|
||||
$lang->custom->productProject->relation['1_1'] = '项目 - 迭代';
|
||||
$lang->custom->productProject->relation['0_2'] = '产品 - 冲刺';
|
||||
$lang->custom->productProject->relation['1_2'] = '项目 - 冲刺';
|
||||
$lang->custom->productProject->relation['0_0'] = '项目 - 产品 - 迭代';
|
||||
$lang->custom->productProject->relation['0_1'] = '项目 - 产品 - 冲刺';
|
||||
|
||||
$lang->custom->productProject->notice = '请根据实际情况选择适合自己团队的概念。';
|
||||
|
||||
|
||||
@@ -530,6 +530,34 @@ class customModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set qc concept.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setConcept()
|
||||
{
|
||||
$this->loadModel('setting')->setItem('system.custom.productProject', $this->post->productProject);
|
||||
|
||||
/* Change block title. */
|
||||
$oldConfig = isset($this->config->custom->productProject) ? $this->config->custom->productProject : '0_0';
|
||||
$newConfig = $this->post->productProject;
|
||||
|
||||
list($oldProductIndex, $oldProjectIndex) = explode('_', $oldConfig);
|
||||
list($newProductIndex, $newProjectIndex) = explode('_', $newConfig);
|
||||
|
||||
foreach($this->config->productCommonList as $clientLang => $productCommonList)
|
||||
{
|
||||
$this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$productCommonList[$oldProductIndex]}', '{$productCommonList[$newProductIndex]}')")->where('source')->eq('product')->exec();
|
||||
}
|
||||
|
||||
foreach($this->config->projectCommonList as $clientLang => $projectCommonList)
|
||||
{
|
||||
$this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$projectCommonList[$oldProjectIndex]}', '{$projectCommonList[$newProjectIndex]}')")->where('source')->eq('project')->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set story or requirement.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of deny method of user 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: deny.html.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php common::printLink('custom', 'concept', '', "<span class='text'>{$lang->custom->concept}</span>", '', "class='btn btn-link btn-active-text'"); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<form id='ajaxForm' class='form-ajax' method='post'>
|
||||
<div class='modal-body'>
|
||||
<div class="form-group">
|
||||
<label><?php echo $lang->custom->conceptQuestions['overview']?></label>
|
||||
<div class="checkbox"> <?php echo html::radio('productProject', $lang->custom->productProject->relation, zget($this->config->custom, 'productProject', '0_0'))?> </div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label></label>
|
||||
<div><?php echo html::submitButton();?></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php common::printLink('custom', 'plan', '', "<span class='text'>{$lang->custom->plan}</span>", '', "class='btn btn-link btn-active-text'"); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='main-col main-content'>
|
||||
<form class="load-indicator main-form form-ajax" method='post'>
|
||||
<table class='table table-form mw-900px'>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->custom->planStatus;?></th>
|
||||
<td><?php echo html::radio('planStatus', $lang->custom->planStatusList, $status);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class='text-left'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -612,26 +612,10 @@ class product extends control
|
||||
$this->view->method = $method;
|
||||
$this->view->extra = $extra;
|
||||
|
||||
$products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('id')->in(array_keys($this->products))->orderBy('`order` desc')->fetchAll('id');
|
||||
$product = $this->product->getByID($productID);
|
||||
$this->view->products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('id')->in(array_keys($this->products))->orderBy('`order` desc')->fetchAll('id');
|
||||
$this->view->programID = $product->program;
|
||||
|
||||
/* Sort products as lines' order first. */
|
||||
$lines = $this->loadModel('tree')->getLinePairs($useShort = true);
|
||||
$productList = array();
|
||||
foreach($lines as $id => $name)
|
||||
{
|
||||
foreach($products as $key => $product)
|
||||
{
|
||||
if($product->line == $id)
|
||||
{
|
||||
$product->name = $name . '/' . $product->name;
|
||||
$productList[] = $product;
|
||||
unset($products[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
$productList = array_merge($productList, $products);
|
||||
|
||||
$this->view->products = $productList;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,20 +40,6 @@ class productModel extends model
|
||||
}
|
||||
|
||||
$pageActions = '';
|
||||
if($this->app->moduleName == 'release')
|
||||
{
|
||||
$pageActions = html::a(helper::createLink('release', 'create', "productID=$productID&branch=$branch"), "<i class='icon icon-plus'></i> {$this->lang->release->create}", '', "class='btn btn-primary'");
|
||||
|
||||
foreach($this->lang->release->moduleMenus as $key => $menu)
|
||||
{
|
||||
$replace = array();
|
||||
$replace['productID'] = $productID;
|
||||
$replace['branch'] = $branch;
|
||||
|
||||
common::setMenuVars($this->lang->release->moduleMenus, $key, $replace);
|
||||
}
|
||||
$this->lang->moduleMenus['release'] = $this->lang->release->moduleMenus;
|
||||
}
|
||||
if($this->app->moduleName == 'programplan' and isset($product->program))
|
||||
{
|
||||
$pageActions .= html::a(helper::createLink('programplan', 'create', "program=$product->program&productID=$productID"), "<i class='icon icon-plus'></i> {$this->lang->programplan->create}", '', "class='btn btn-primary'");
|
||||
@@ -107,7 +93,7 @@ class productModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($project->category) and $project->category == 'multiple') $pageNav = $selectHtml;
|
||||
if(isset($project->category) and $project->category == 'multiple' || $project->template == 'scrum') $pageNav = $selectHtml;
|
||||
}
|
||||
|
||||
$pageActions = '';
|
||||
|
||||
@@ -25,22 +25,26 @@ foreach($products as $product)
|
||||
{
|
||||
if($product->type != 'platform' && $module == 'branch' && $method == 'manage')
|
||||
{
|
||||
$myProductsHtml .= html::a(sprintf($link, $productID), "<i class='icon icon-cube'></i> " . $product->name, '', "class='text-important' title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
|
||||
$linkHtml = $module == 'programplan' ? sprintf($link, $programID, $productID) : sprintf($link, $productID);
|
||||
$myProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "class='text-important' title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$myProductsHtml .= html::a(sprintf($link, $product->id), "<i class='icon icon-cube'></i> " . $product->name, '', "class='text-important' title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
|
||||
$linkHtml = $module == 'programplan' ? sprintf($link, $programID, $product->id) : sprintf($link, $product->id);
|
||||
$myProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "class='text-important' title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
|
||||
}
|
||||
}
|
||||
else if($product->status == 'normal' and !($product->PO == $this->app->user->account))
|
||||
{
|
||||
if($product->type != 'platform' && $module == 'branch' && $method == 'manage')
|
||||
{
|
||||
$normalProductsHtml .= html::a(sprintf($link, $productID), "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
|
||||
$linkHtml = $module == 'programplan' ? sprintf($link, $programID, $productID) : sprintf($link, $productID);
|
||||
$normalProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$normalProductsHtml .= html::a(sprintf($link, $product->id), "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
|
||||
$linkHtml = $module == 'programplan' ? sprintf($link, $programID, $product->id) : sprintf($link, $product->id);
|
||||
$normalProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
|
||||
}
|
||||
}
|
||||
else if($product->status == 'closed')
|
||||
@@ -48,11 +52,13 @@ foreach($products as $product)
|
||||
|
||||
if($product->type != 'platform' && $module == 'branch' && $method == 'manage')
|
||||
{
|
||||
$closedProductsHtml .= html::a(sprintf($link, $productID), "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "'");
|
||||
$linkHtml = $module == 'programplan' ? sprintf($link, $programID, $productID) : sprintf($link, $productID);
|
||||
$closedProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$closedProductsHtml .= html::a(sprintf($link, $product->id), "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "'");
|
||||
$linkHtml = $module == 'programplan' ? sprintf($link, $programID, $product->id) : sprintf($link, $product->id);
|
||||
$closedProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,7 +80,8 @@ foreach($products as $product)
|
||||
?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<?php echo html::a(helper::createLink('product', 'all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->product->all, '', 'class="not-list-item"'); ?>
|
||||
<?php //echo html::a(helper::createLink('product', 'all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->product->all, '', 'class="not-list-item"'); ?>
|
||||
<?php echo html::a(helper::createLink('product', 'create', "program=$programID"), '<i class="icon icon-plus"></i> ' . $lang->product->create, '', 'class="not-list-item"'); ?>
|
||||
<a class='pull-right toggle-right-col not-list-item'><?php echo $lang->product->closed?><i class='icon icon-angle-right'></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+12
-15
@@ -62,21 +62,7 @@ class projectModel extends model
|
||||
*/
|
||||
public function setMenu($projects, $projectID, $buildID = 0, $extra = '')
|
||||
{
|
||||
if(!$projectID and $this->session->project) $projectID = $this->session->project;
|
||||
|
||||
/* Get project and program */
|
||||
$project = $this->getById($projectID);
|
||||
$isProgram = false;
|
||||
$program = array();
|
||||
if(!empty($project))
|
||||
{
|
||||
$isProgram = $project->template;
|
||||
$program = $isProgram ? $project : $this->getByID($project->program);
|
||||
}
|
||||
if(empty($program)) $program = $this->getByID($this->session->program);
|
||||
|
||||
$projects = $this->getPairs();
|
||||
|
||||
$program = $this->getByID($this->session->program);
|
||||
if(empty($projects))
|
||||
{
|
||||
if($program->template == 'cmmi')
|
||||
@@ -89,6 +75,17 @@ class projectModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if(!$projectID and $this->session->project) $projectID = $this->session->project;
|
||||
|
||||
/* Get project and program */
|
||||
$project = $this->getById($projectID);
|
||||
$isProgram = false;
|
||||
if(!empty($project))
|
||||
{
|
||||
$isProgram = $project->template;
|
||||
$program = $isProgram ? $project : $this->getByID($project->program);
|
||||
}
|
||||
|
||||
if($isProgram)
|
||||
{
|
||||
$projectID = $this->session->project;
|
||||
|
||||
Reference in New Issue
Block a user