* Modify the variables of the design module.
This commit is contained in:
@@ -110,7 +110,7 @@ class design extends control
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productID);
|
||||
$this->view->productID = $productID;
|
||||
$this->view->program = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
$this->view->project = $this->loadModel('program')->getPRJByID($this->session->PRJ);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -214,9 +214,9 @@ class design extends control
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->edit;
|
||||
$this->view->position[] = $this->lang->design->edit;
|
||||
|
||||
$this->view->design = $design;
|
||||
$this->view->program = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($design->product);
|
||||
$this->view->design = $design;
|
||||
$this->view->project = $this->loadModel('program')->getPRJByID($this->session->PRJ);
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($design->product);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -236,9 +236,9 @@ class design extends control
|
||||
*/
|
||||
public function linkCommit($designID = 0, $repoID = 0, $begin = '', $end = '', $recTotal = 0, $recPerPage = 50, $pageID = 1)
|
||||
{
|
||||
/* Get program and date. */
|
||||
$program = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
$begin = $begin ? date('Y-m-d', strtotime($begin)) : $program->begin;
|
||||
/* Get project and date. */
|
||||
$project = $this->loadModel('program')->getPRJByID($this->session->PRJ);
|
||||
$begin = $begin ? date('Y-m-d', strtotime($begin)) : $project->begin;
|
||||
$end = $end ? date('Y-m-d', strtotime($end)) : helper::today();
|
||||
|
||||
/* Get the repository information through the repoID. */
|
||||
|
||||
@@ -292,7 +292,7 @@ class designModel extends model
|
||||
* Get design list.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $programID
|
||||
* @param int $projectID
|
||||
* @param string $type all|bySearch|HLDS|DDS|DBDS|ADS
|
||||
* @param int $param
|
||||
* @param string $orderBy
|
||||
@@ -300,17 +300,17 @@ class designModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getList($programID = 0, $productID = 0, $type = 'all', $param = 0, $orderBy = 'id_desc', $pager = null)
|
||||
public function getList($projectID = 0, $productID = 0, $type = 'all', $param = 0, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
if($type == 'bySearch')
|
||||
{
|
||||
$designs = $this->getBySearch($programID, $productID, $param, $orderBy, $pager);
|
||||
$designs = $this->getBySearch($projectID, $productID, $param, $orderBy, $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
$designs = $this->dao->select('*')->from(TABLE_DESIGN)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF($programID)->andWhere('PRJ')->eq($programID)->fi()
|
||||
->beginIF($projectID)->andWhere('PRJ')->eq($projectID)->fi()
|
||||
->beginIF($type != 'all')->andWhere('type')->in($type)->fi()
|
||||
->andWhere('product')->eq($productID)
|
||||
->orderBy($orderBy)
|
||||
@@ -341,7 +341,7 @@ class designModel extends model
|
||||
/**
|
||||
* Get designs by search.
|
||||
*
|
||||
* @param int $programID
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param int $queryID
|
||||
* @param string $orderBy
|
||||
@@ -349,7 +349,7 @@ class designModel extends model
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getBySearch($programID = 0, $productID = 0, $queryID = 0, $orderBy = 'id_desc', $pager = null)
|
||||
public function getBySearch($projectID = 0, $productID = 0, $queryID = 0, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
if($queryID)
|
||||
{
|
||||
@@ -374,7 +374,7 @@ class designModel extends model
|
||||
$designs = $this->dao->select('*')->from(TABLE_DESIGN)
|
||||
->where($designQuery)
|
||||
->andWhere('deleted')->eq('0')
|
||||
->andWhere('PRJ')->eq($programID)
|
||||
->andWhere('PRJ')->eq($projectID)
|
||||
->andWhere('product')->eq($productID)
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<?php if($program->product == 'multiple'):?>
|
||||
<?php if($project->product == 'multiple'):?>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->design->product;?></th>
|
||||
<td><?php echo html::select('product', $products, $productID, "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($program->product == 'single') echo html::hidden('product', $productID);?>
|
||||
<?php if($project->product == 'single') echo html::hidden('product', $productID);?>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->design->story;?></th>
|
||||
<td><?php echo html::select('story', empty($stories) ? '' : $stories, '', "class='form-control chosen'");?></td>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<?php if($program->product == 'multiple'):?>
|
||||
<?php if($project->product == 'multiple'):?>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->design->product;?></th>
|
||||
<td><?php echo html::select('product', $products, $design->product, "class='form-control chosen'");?></td>
|
||||
|
||||
Reference in New Issue
Block a user