* Fix details.
This commit is contained in:
+2
-2
@@ -223,8 +223,8 @@ INSERT INTO `zt_product` (`id`, `program`, `name`, `code`, `status`, `desc`, `PO
|
||||
|
||||
INSERT INTO `zt_productplan` (`id`, `product`, `title`, `desc`, `begin`, `end`, `deleted`) VALUES(1, 1, '1.0版本', '开发出企业网站1.0版本。<br />', '2000-01-01', '2015-01-01', '0');
|
||||
|
||||
INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `template`, `category`,`parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(1, '0', 0, 'sprint', 'waterfall', 'single', 0, '企业网站第一期', 'coWeb1', '2012-06-05', '2012-12-04', 184, 'done', '1', '1', '开发企业网站的基本雏形。<br />', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '5', '0');
|
||||
INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `template`, `category`, `parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(2, '0', 0, 'sprint', 'waterfall', 'single', 0, '企业网站第二期', 'coWebsite2', '2013-06-05', '2014-06-04', 365, 'wait', '1', '1', '', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '10', '0');
|
||||
INSERT INTO `zt_project` (`id`, `type`, `model`, `parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(1, 'program', '', 0, '企业网站第一期', 'coWeb1', '2012-06-05', '2012-12-04', 184, 'done', '1', '1', '开发企业网站的基本雏形。<br />', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '5', '0');
|
||||
INSERT INTO `zt_project` (`id`, `type`, `model`, `parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(2, 'program', '', 0, '企业网站第二期', 'coWebsite2', '2013-06-05', '2014-06-04', 365, 'wait', '1', '1', '', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '10', '0');
|
||||
|
||||
INSERT INTO `zt_doclib` (`id`, `type`, `product`, `project`, `name`, `acl`, `main`) VALUES(1, 'product', 1, 0, '产品库', 'default','1');
|
||||
INSERT INTO `zt_doclib` (`id`, `type`, `product`, `project`, `name`, `acl`, `main`) VALUES(2, 'product', 2, 0, '产品库', 'default', '1');
|
||||
|
||||
@@ -8,7 +8,6 @@ CREATE TABLE IF NOT EXISTS `zt_acl` (
|
||||
`source` char(30) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- DROP TABLE IF EXISTS `zt_action`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_action` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
|
||||
@@ -175,7 +175,7 @@ class router extends baseRouter
|
||||
if(isset($model->model) && $model->model == 'waterfall')
|
||||
{
|
||||
$projectIndex = 2;
|
||||
$planIndex = 1;
|
||||
//$planIndex = 1;
|
||||
}
|
||||
|
||||
$config->storyCommon = $storyIndex;
|
||||
|
||||
@@ -26,7 +26,7 @@ class design extends control
|
||||
parent::__construct($moduleName, $methodName);
|
||||
$products = array();
|
||||
$this->loadModel('product');
|
||||
$this->view->products = $this->products = $this->product->getPairs('nocode', $this->session->PRJ);
|
||||
$this->view->products = $this->products = $this->product->getProductsByProject($this->session->PRJ);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,7 +46,6 @@ class design extends control
|
||||
{
|
||||
/* Save session for design list and process product id. */
|
||||
$this->session->set('designList', $this->app->getURI(true));
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$this->design->setProductMenu($productID);
|
||||
|
||||
/* Build the search form. */
|
||||
|
||||
@@ -393,14 +393,11 @@ class designModel extends model
|
||||
*/
|
||||
public function setProductMenu($productID = 0)
|
||||
{
|
||||
$programID = $this->session->PRJ;
|
||||
$program = $this->loadModel('project')->getByID($programID);
|
||||
$products = $this->loadModel('product')->getPairs('', $programID);
|
||||
if(empty($products)) die(js::locate(helper::createLink('product', 'create')));
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
$productID = in_array($productID, array_keys($products)) ? $productID : key($products);
|
||||
|
||||
$productID = $this->loadModel('product')->saveState($productID, $products);
|
||||
if($program->product == 'multiple') $this->loadModel('product')->setMenu($products, $productID);
|
||||
$this->loadModel('product')->setMenu($products, $productID);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -63,9 +63,9 @@
|
||||
<td class='c-actions text-center'>
|
||||
<?php
|
||||
$vars = "design={$design->id}";
|
||||
common::printIcon('design', 'edit', $vars, $design, 'list', 'fork', '', '', '', '', '', $design->program);
|
||||
common::printIcon('design', 'edit', $vars, $design, 'list', 'fork', '', '', '', '', '', $design->PRJ);
|
||||
common::printIcon('design', 'viewCommit', $vars, $design, 'list', 'list-alt', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin', '', '', '', '', $design->program);
|
||||
common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin', '', '', '', '', $design->PRJ);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -700,9 +700,10 @@ class product extends control
|
||||
$this->view->module = $module;
|
||||
$this->view->method = $method;
|
||||
$this->view->extra = $extra;
|
||||
$products = $this->product->getProductsByProject($this->session->PRJ);
|
||||
|
||||
$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->products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('id')->in(array_keys($products))->orderBy('`order` desc')->fetchAll('id');
|
||||
$this->view->programID = $product->program;
|
||||
|
||||
$this->display();
|
||||
|
||||
@@ -88,18 +88,15 @@ class productModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($project->product) and $project->product == 'multiple')
|
||||
{
|
||||
$label = $this->lang->product->index;
|
||||
$pageNav = '<div class="btn-group angle-btn' . ($currentMethod == 'index' ? ' active' : '') . '"><div class="btn-group"><button data-toggle="dropdown" type="button" class="btn">' . $label . ' <span class="caret"></span></button>';
|
||||
$pageNav .= '<ul class="dropdown-menu">';
|
||||
if($this->config->global->flow == 'full' && common::hasPriv('product', 'index')) $pageNav .= '<li>' . html::a(helper::createLink('product', 'index', 'locate=no'), '<i class="icon icon-home"></i> ' . $this->lang->product->index) . '</li>';
|
||||
if(common::hasPriv('product', 'all')) $pageNav .= '<li>' . html::a(helper::createLink('product', 'all'), '<i class="icon icon-cards-view"></i> ' . $this->lang->product->all) . '</li>';
|
||||
if(common::hasPriv('product', 'create')) $pageNav .= '<li>' . html::a(helper::createLink('product', 'create'), '<i class="icon icon-plus"></i> ' . $this->lang->product->create) . '</li>';
|
||||
$label = $this->lang->product->index;
|
||||
$pageNav = '<div class="btn-group angle-btn' . ($currentMethod == 'index' ? ' active' : '') . '"><div class="btn-group"><button data-toggle="dropdown" type="button" class="btn">' . $label . ' <span class="caret"></span></button>';
|
||||
$pageNav .= '<ul class="dropdown-menu">';
|
||||
if($this->config->global->flow == 'full' && common::hasPriv('product', 'index')) $pageNav .= '<li>' . html::a(helper::createLink('product', 'index', 'locate=no'), '<i class="icon icon-home"></i> ' . $this->lang->product->index) . '</li>';
|
||||
if(common::hasPriv('product', 'all')) $pageNav .= '<li>' . html::a(helper::createLink('product', 'all'), '<i class="icon icon-cards-view"></i> ' . $this->lang->product->all) . '</li>';
|
||||
if(common::hasPriv('product', 'create')) $pageNav .= '<li>' . html::a(helper::createLink('product', 'create'), '<i class="icon icon-plus"></i> ' . $this->lang->product->create) . '</li>';
|
||||
|
||||
$pageNav .= '</ul></div></div>';
|
||||
$pageNav .= $selectHtml;
|
||||
}
|
||||
$pageNav .= '</ul></div></div>';
|
||||
$pageNav .= $selectHtml;
|
||||
}
|
||||
|
||||
return $pageNav;
|
||||
|
||||
@@ -320,7 +320,7 @@ class programModel extends model
|
||||
$groupPriv = new stdclass();
|
||||
$groupPriv->account = $this->app->user->account;
|
||||
$groupPriv->group = $PRJAdminID;
|
||||
$groupPriv->program = $programID;
|
||||
$groupPriv->PRJ = $programID;
|
||||
$this->dao->insert(TABLE_USERGROUP)->data($groupPriv)->exec();
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<td class='c-name text-left pgm-title table-nest-title' title='<?php echo $program->name?>'>
|
||||
<span class="table-nest-icon icon <?php if($program->type == 'program') echo ' table-nest-toggle' ?>"></span>
|
||||
<?php if($program->type == 'program'):?>
|
||||
<?php echo html::a($this->createLink('program', 'pgmview', "programID=$program->id"), "<i class='icon icon-folder-open-o'></i>" . $program->name);?>
|
||||
<?php echo html::a($this->createLink('program', 'pgmview', "programID=$program->id"), "<i class='icon icon-folder-open-o'></i> " . $program->name);?>
|
||||
<?php else:?>
|
||||
<?php echo html::a($this->createLink('program', 'index', "programID=$program->id", '', '', $program->id), "<i class='icon icon-file'></i> " . $program->name);?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -36,7 +36,7 @@ class programplan extends control
|
||||
*/
|
||||
public function commonAction($projectID, $productID = 0, $extra = '')
|
||||
{
|
||||
$products = $this->loadModel('product')->getProductsByProject('', $projectID);
|
||||
$products = $this->loadModel('product')->getProductsByProject($projectID);
|
||||
$productID = $this->product->saveState($productID, $products);
|
||||
$this->productID = $productID;
|
||||
$this->product->setMenu($products, $productID, 0, 0, '', $extra);
|
||||
|
||||
@@ -25,7 +25,6 @@ class project extends control
|
||||
{
|
||||
$this->projects = $this->project->getPairs('nocode', $this->session->PRJ);
|
||||
if(!$this->projects and $this->methodName != 'index' and $this->methodName != 'create' and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('project', 'create'));
|
||||
if(!$this->projects and $this->methodName != 'index' and $this->methodName != 'create' and $this->app->getViewType() == 'mhtml') $this->locate($this->createLink('project', 'index'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ class repoModel extends model
|
||||
{
|
||||
$repos = $this->dao->select('*')->from(TABLE_REPO)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere("CONCAT(',', program, ',')")->like("%,{$programID},%")
|
||||
->andWhere("CONCAT(',', PRJ, ',')")->like("%,{$programID},%")
|
||||
->orderBy($orderBy)
|
||||
->page($pager)->fetchAll('id');
|
||||
|
||||
@@ -195,7 +195,7 @@ class repoModel extends model
|
||||
if(!$this->checkConnection()) return false;
|
||||
$data = fixer::input('post')
|
||||
->skipSpecial('path,client,account,password')
|
||||
->join('program', ',')
|
||||
->join('PRJ', ',')
|
||||
->get();
|
||||
|
||||
$data->acl = empty($data->acl) ? '' : json_encode($data->acl);
|
||||
@@ -237,7 +237,7 @@ class repoModel extends model
|
||||
->setDefault('prefix', $repo->prefix)
|
||||
->setIF($this->post->path != $repo->path, 'synced', 0)
|
||||
->skipSpecial('path,client,account,password')
|
||||
->join('program', ',')
|
||||
->join('PRJ', ',')
|
||||
->get();
|
||||
$data->acl = empty($data->acl) ? '' : json_encode($data->acl);
|
||||
|
||||
@@ -286,7 +286,7 @@ class repoModel extends model
|
||||
{
|
||||
$repos = $this->dao->select('*')->from(TABLE_REPO)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere("CONCAT(',', program, ',')")->like("%,{$programID},%")
|
||||
->andWhere("CONCAT(',', PRJ, ',')")->like("%,{$programID},%")
|
||||
->fetchAll();
|
||||
|
||||
$repoPairs = array();
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->repo->program; ?></th>
|
||||
<td class='required'><?php echo html::select('program[]', $programs, $this->session->PRJ, "class='form-control chosen' multiple"); ?></td>
|
||||
<td class='required'><?php echo html::select('PRJ[]', $programs, $this->session->PRJ, "class='form-control chosen' multiple"); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->repo->type; ?></th>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->repo->program; ?></th>
|
||||
<td class='required'><?php echo html::select('program[]', $programs, $repo->program, "class='form-control chosen' multiple"); ?></td>
|
||||
<td class='required'><?php echo html::select('PRJ[]', $programs, $repo->program, "class='form-control chosen' multiple"); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->repo->type; ?></th>
|
||||
|
||||
Reference in New Issue
Block a user