* Finish task #7628.

This commit is contained in:
tianshujie98
2020-08-20 16:24:17 +08:00
parent ad0f2a65a9
commit e4b7c55620
11 changed files with 307 additions and 201 deletions
+107 -30
View File
@@ -1,7 +1,29 @@
<?php
/**
* The control file of design currentModule 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 design
* @version $Id: control.php 5107 2013-07-12 01:46:12Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
class design extends control
{
public function browse($productID = 0,$type = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
/**
* Browse designs.
*
* @param int $productID
* @param string $type
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function browse($productID = 0, $type = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$productID = $this->loadModel('product')->saveState($productID, $this->product->getPairs('nocode'));
@@ -33,27 +55,38 @@ class design extends control
$this->display();
}
/**
* Create a design.
*
* @param int $productID
* @param string $prevModule
* @param int $prevID
* @access public
* @return void
*/
public function create($productID = 0, $prevModule = '', $prevID = 0)
{
$productID = $this->loadModel('product')->saveState($productID, $this->product->getPairs('nocode'));
$this->design->setProductMenu($productID);
if($_POST)
{
$productID = $_POST['product'];
$productID = $this->post->product;
$designID = $this->design->create();
if($designID)
if(dao::isError())
{
$this->loadModel('action')->create('design', $designID, 'created');
$response['result'] = 'success';
$response['message'] = $this->lang->saveSuccess;
$response['locate'] = $this->createLink('design', 'browse', "productID=$productID");
$response['result'] = 'fail';
$response['message'] = dao::getError();
$this->send($response);
}
$response['result'] = 'fail';
$response['message'] = dao::getError();
$this->loadModel('action')->create('design', $designID, 'created');
$response['result'] = 'success';
$response['message'] = $this->lang->saveSuccess;
$response['locate'] = $this->createLink('design', 'browse', "productID=$productID");
$this->send($response);
}
@@ -69,26 +102,40 @@ class design extends control
$this->display();
}
/**
* View a design.
*
* @param int $designID
* @access public
* @return void
*/
public function view($designID = 0)
{
$data = $this->design->getById($designID);
$data->productName = $this->dao->findByID($data->product)->from(TABLE_PRODUCT)->fetch('name');
$data->files = $this->loadModel('file')->getByObject('design', $designID);
$design = $this->design->getById($designID);
$design->productName = $this->dao->findByID($design->product)->from(TABLE_PRODUCT)->fetch('name');
$design->files = $this->loadModel('file')->getByObject('design', $designID);
$relations = $this->loadModel('common')->getRelations('design', $data->id, 'commit');
$data->commit = '';
foreach($relations as $relation) $data->commit .= html::a(helper::createLink('design', 'revision', "repoID=$relation->BID", '', true), "#$relation->BID", '', "class='iframe' data-width='80%' data-height='550'");
$relations = $this->loadModel('common')->getRelations('design', $design->id, 'commit');
$storyTitle = $this->dao->findByID($design->story)->from(TABLE_STORY)->fetch('title');
$design->commit = '';
if(!empty($_GET['onlybody']))
{
foreach($relations as $relation) $design->commit .= " #$relation->BID";
$design->story = $storyTitle;
}
else
{
foreach($relations as $relation) $design->commit .= html::a(helper::createLink('design', 'revision', "repoID=$relation->BID", '', true), "#$relation->BID", '', "class='iframe' data-width='80%' data-height='550'");
$design->story = $storyTitle ? html::a($this->createLink('story', 'view', "id=$design->story"), $storyTitle) : '';
}
$storyTitle = $this->dao->findByID($data->story)->from(TABLE_STORY)->fetch('title');
$data->story = $storyTitle ? html::a($this->createLink('story', 'view', "id=$data->story"), $storyTitle) : '';
$actions = $this->loadModel('action')->getList('design', $data->id);
$actions = $this->loadModel('action')->getList('design', $design->id);
$this->view->title = $this->lang->design->designView;
$this->view->position[] = $this->lang->design->designView;
$this->view->productID = $data->product;
$this->view->data = $data;
$this->view->productID = $design->product;
$this->view->design = $design;
$this->view->relations = $relations;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->actions = $actions;
@@ -96,6 +143,13 @@ class design extends control
$this->display();
}
/**
* Edit a design.
*
* @param int $designID
* @access public
* @return void
*/
public function edit($designID = 0)
{
$design = $this->design->getByID($designID);
@@ -105,13 +159,16 @@ class design extends control
if($_POST)
{
$changes = $this->design->update($designID);
if($changes)
if(dao::isError())
{
$actionID = $this->loadModel('action')->create('design', $designID, 'changed');
$this->action->logHistory($actionID, $changes);
$response['result'] = 'fail';
$response['message'] = dao::getError();
$this->send($response);
}
$actionID = $this->loadModel('action')->create('design', $designID, 'changed');
$this->action->logHistory($actionID, $changes);
$response['result'] = 'success';
$response['message'] = $this->lang->saveSuccess;
$response['locate'] = $this->createLink('design', 'view', "id=$design->id");
@@ -129,18 +186,30 @@ class design extends control
$this->display();
}
/**
* Commit a design.
*
* @param int $designID
* @param string $begin
* @param string $end
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function commit($designID, $begin = '', $end = '', $recTotal = 0, $recPerPage = 50, $pageID = 1)
{
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
$pager = new pager($recTotal, $recPerPage, $pageID);
$program = $this->loadModel('project')->getByID($this->session->program);
$begin = $begin ? date('Y-m-d', strtotime($begin)) : $program->begin;
$end = $end ? date('Y-m-d', strtotime($end)) : helper::today();
$repoID = $this->session->repoID;
$repo = $this->loadModel('repo')->getRepoByID($repoID);
$revisions = $this->repo->getCommits($repo, '', 'HEAD', '', $pager, $begin, $end);
$repoID = $this->session->repoID;
$repo = $this->loadModel('repo')->getRepoByID($repoID);
$revisions = $this->repo->getCommits($repo, '', 'HEAD', '', $pager, $begin, $end);
if($_POST)
{
@@ -172,6 +241,14 @@ class design extends control
$this->display();
}
/**
* Delete a design.
*
* @param int $designID
* @param string $confirm
* @access public
* @return void
*/
public function delete($designID, $confirm = 'no')
{
if($confirm == 'no')
+3
View File
@@ -0,0 +1,3 @@
#featurebar{display:inline-block;}
.modal-dialog{width:70% !important}
table td{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
+1
View File
@@ -0,0 +1 @@
.tabs .tab-pane .table{border: 1px solid #ddd; border-top: none}
+11
View File
@@ -3,3 +3,14 @@ $(document).on('click', '.ajaxPager', function()
$('#logBox').load($(this).attr('href'));
return false;
})
$('#product').change(function()
{
productID = $(this).val();
var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID);
$.post(link, function(data)
{
$('#story').replaceWith(data);
$('#story_chosen').remove();
$('#story').chosen();
})
})
+6
View File
@@ -0,0 +1,6 @@
$('.main-actions').width($('.main-col').outerWidth());
if(showAction == 'hidden')
{
$('.main-actions').remove();
$('.pull-left').children('a').remove();
};
+80 -39
View File
@@ -1,6 +1,24 @@
<?php
/**
* The model file of design 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 design
* @version $Id: model.php 5079 2013-07-10 00:44:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php
class designModel extends model
{
/**
* Create a design.
*
* @access public
* @return int|bool
*/
public function create()
{
$design = fixer::input('post')
@@ -16,7 +34,7 @@ class designModel extends model
$this->dao->insert(TABLE_DESIGN)->data($design)->autoCheck()->batchCheck('name,type', 'notempty')->exec();
if(!dao::isError())
{
{
$designID = $this->dao->lastInsertID();
$this->file->updateObjectID($this->post->uid, $designID, 'design');
$files = $this->file->saveUpload('design', $designID);
@@ -30,11 +48,18 @@ class designModel extends model
$this->dao->insert(TABLE_DESIGNSPEC)->data($spec)->exec();
return $designID;
}
}
return false;
}
/**
* Update a design.
*
* @param int $designID
* @access public
* @return bool
*/
public function update($designID)
{
$oldDesign = $this->getByID($designID);
@@ -57,7 +82,7 @@ class designModel extends model
if($designChanged)
{
$design = $this->getByID($designID);
$version = $design->version + 1;
$version = $design->version + 1;
$spec = new stdclass();
$spec->design = $designID;
$spec->version = $version;
@@ -70,16 +95,23 @@ class designModel extends model
}
return common::createChanges($oldDesign, $design);
}
}
return false;
}
/**
* LinkCommit a design.
*
* @param int $designID
* @access public
* @return void
*/
public function linkCommit($designID)
{
$this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('AID')->eq($designID)->andWhere('BType')->eq('commit')->andWhere('relation')->eq('completedin')->exec();
$this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('commit')->andWhere('BID')->eq($designID)->andWhere('BType')->eq('design')->andWhere('relation')->eq('completedfrom')->exec();
$revisions = $_POST['revision'];
$revisions = $_POST['revision'];
foreach($revisions as $revision)
{
@@ -105,38 +137,15 @@ class designModel extends model
}
}
public function setFlowActionFields($module, $action)
{
$flow = $this->loadModel('workflow', 'flow')->getByModule($module);
$action = $this->loadModel('workflowaction', 'flow')->getByModuleAndAction($flow->module, $action);
$fields = $this->workflowaction->getFields($flow->module, $action->action);
return array($flow, $action, $fields);
}
public function setFlowChild($module, $action, $fields, $dataID = 0)
{
$this->loadModel('workflowlayout', 'flow');
$childFields = array();
$childDatas = array();
$childModules = $this->loadModel('workflow', 'flow')->getList($module, 'table');
foreach($childModules as $childModule)
{
$key = 'sub_' . $childModule->module;
if(isset($fields[$key]) && $fields[$key]->show)
{
$childFields[$key] = $this->workflowaction->getFields($childModule->module, $action);
$childDatas[$key] = $this->flow->getDataList($childModule, '', 0, $dataID);
}
}
return array($childFields, $childDatas);
}
/**
* SetProductMenu
*
* @param int $productID
* @access public
* @return void
*/
public function setProductMenu($productID = 0)
{
{
$programID = $this->session->program;
$products = $this->loadModel('product')->getPairs($programID);
$productID = in_array($productID, array_keys($products)) ? $productID : key($products);
@@ -145,12 +154,27 @@ class designModel extends model
$this->loadModel('product')->setMenu($products, $productID);
}
/**
* GetByID
*
* @param int $designID
* @access public
* @return object
*/
public function getByID($designID)
{
$design = $this->dao->select('*')->from(TABLE_DESIGN)->where('id')->eq($designID)->fetch();
return $this->loadModel('file')->replaceImgURL($design, 'desc');
}
/**
* GetDesignPairs
*
* @param int $productID
* @param string $type
* @access public
* @return object
*/
public function getDesignPairs($productID = 0, $type = 'detailed')
{
$designs = $this->dao->select('id, name')->from(TABLE_DESIGN)
@@ -158,13 +182,20 @@ class designModel extends model
->andWhere('deleted')->eq(0)
->andWhere('type')->eq($type)
->fetchPairs();
foreach($designs as $id => $name) $designs[$id] = $id . ':' . $name;
foreach($designs as $id => $name) $designs[$id] = $id . ':' . $name;
return $designs;
}
/**
* GetAffectedScope
*
* @param int $design
* @access public
* @return object
*/
public function getAffectedScope($design)
{
{
/* Get affected tasks. */
$design->tasks = $this->dao->select('*')->from(TABLE_TASK)
->where('deleted')->eq(0)
@@ -175,6 +206,16 @@ class designModel extends model
return $design;
}
/**
* GetList
*
* @param int $productID
* @param int $type
* @param int $orderBy
* @param int $pager
* @access public
* @return array
*/
public function getList($productID, $type, $orderBy, $pager)
{
return $this->dao->select('*')->from(TABLE_DESIGN)
+32 -69
View File
@@ -1,32 +1,16 @@
<?php
/**
* The browse view file of flow module of RanZhi.
* The browse view file of design module of ZenTaoPMS.
*
* @copyright Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license 商业软件,非开源软件
* @author Gang Liu <liugang@cnezsoft.com>
* @package flow
* @version $Id$
* @link http://www.ranzhico.com
* @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 design
* @version $Id: browse.html.php 5102 2013-07-12 00:59:54Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php
if(!empty($dataList))
{
foreach($dataList as $data)
{
$relations = $this->loadModel('common')->getRelations('design', $data->id, 'commit');
$data->commit = '';
foreach($relations as $relation) $data->commit .= html::a(helper::createLink('design', 'revision', "repoID=$relation->BID", '', true), "#$relation->BID", '', "class='iframe' data-width='80%' data-height='550'");
}
}
?>
<?php include '../../' . 'common/view/header.html.php';?>
<style>
#featurebar{display:inline-block;}
.modal-dialog{width:70% !important}
table td{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
</style>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/sortable.html.php';?>
<?php js::set('productID', $productID);?>
<?php
@@ -37,23 +21,21 @@ js::set('showSubHeader', $showSubHeader);
<div class='btn-toolbar pull-left'>
<?php
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
echo html::a(inlink('browse', "productID={$productID}&type=all"), "<span class='text'>{$lang->design->typeList['all']}</span>" . ($type == 'all' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'all' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=HLDS"), "<span class='text'>{$lang->design->typeList['HLDS']}</span>" . ($type == 'HLDS' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'HLDS' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=DDS"), "<span class='text'>{$lang->design->typeList['DDS']}</span>" . ($type == 'DDS' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'DDS' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=DBDS"), "<span class='text'>{$lang->design->typeList['DBDS']}</span>" . ($type == 'DBDS' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'DBDS' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=ADS"), "<span class='text'>{$lang->design->typeList['ADS']}</span>" . ($type == 'ADS' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'ADS' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=all"), "<span class='text'>{$lang->design->typeList['all']}</span>" . ($type == 'all' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'all' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=HLDS"), "<span class='text'>{$lang->design->typeList['HLDS']}</span>" . ($type == 'HLDS' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'HLDS' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=DDS"), "<span class='text'>{$lang->design->typeList['DDS']}</span>" . ($type == 'DDS' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'DDS' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=DBDS"), "<span class='text'>{$lang->design->typeList['DBDS']}</span>" . ($type == 'DBDS' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'DBDS' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$productID}&type=ADS"), "<span class='text'>{$lang->design->typeList['ADS']}</span>" . ($type == 'ADS' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'ADS' ? ' btn-active-text' : '') . "'");
?>
</div>
<div class='btn-toolbar pull-right'>
<?php
if(common::hasPriv('design', 'create')) echo html::a($this->createLink('design', 'create', "productID=$productID&designID=0"), "<i class='icon icon-plus'></i> {$lang->design->create}", '', "class='btn btn-primary'");
?>
<?php if(common::hasPriv('design', 'create')) echo html::a($this->createLink('design', 'create', "productID=$productID&designID=0"), "<i class='icon icon-plus'></i> {$lang->design->create}", '', "class='btn btn-primary'");?>
</div>
</div>
<div id="mainContent" class="main-row fade in">
<?php if(empty($designs)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->design->noDesign;?></span></p>
<p><span class="text-muted"><?php echo $lang->design->noDesign;?></span></p>
</div>
<?php else:?>
<form id='designFrom' method='post' class="main-table">
@@ -61,34 +43,15 @@ js::set('showSubHeader', $showSubHeader);
<?php $vars = "productID=$productID&orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID";?>
<thead>
<tr>
<th class="text-left w-120px">
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll;?>"></div>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class="text-left w-120px">
<?php common::printOrderLink('type', $orderBy, $vars, $lang->design->type);?>
</th>
<th class="text-left">
<?php common::printOrderLink('name', $orderBy, $vars, $lang->design->name);?>
</th>
<th class="text-left w-130px">
<?php common::printOrderLink('commit', $orderBy, $vars, $lang->design->submission);?>
</th>
<th class="text-left w-70px">
<?php common::printOrderLink('version', $orderBy, $vars, $lang->design->version);?>
</th>
<th class="text-left w-120px">
<?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->design->createdBy);?>
</th>
<th class="text-left w-150px">
<?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->design->createdDate);?>
</th>
<th class="text-left w-120px">
<?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->design->assignedTo);?>
</th>
<th class="text-center w-100px">
<?php echo $lang->design->actions;?>
</th>
<th class="text-left w-120px"> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class="text-left w-120px"> <?php common::printOrderLink('type', $orderBy, $vars, $lang->design->type);?></th>
<th class="text-left"> <?php common::printOrderLink('name', $orderBy, $vars, $lang->design->name);?></th>
<th class="text-left w-130px"> <?php common::printOrderLink('commit', $orderBy, $vars, $lang->design->submission);?></th>
<th class="text-left w-70px"> <?php common::printOrderLink('version', $orderBy, $vars, $lang->design->version);?></th>
<th class="text-left w-120px"> <?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->design->createdBy);?></th>
<th class="text-left w-150px"> <?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->design->createdDate);?></th>
<th class="text-left w-120px"> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->design->assignedTo);?></th>
<th class="text-center w-100px"><?php echo $lang->design->actions;?></th>
</tr>
</thead>
<tbody>
@@ -103,21 +66,21 @@ js::set('showSubHeader', $showSubHeader);
<td class='text-left'><?php echo $design->createdDate;?></td>
<td class='text-left'><?php echo $design->assignedTo;?></td>
<td class='c-actions text-center'>
<?php
$vars = "design={$design->id}";
common::printIcon('design', 'edit', $vars, $design, 'list', 'fork', '', '', '', '', '', $design->program);
common::printIcon('design', 'commit', $vars, $design, 'list', 'link', '', 'iframe showinonlybody', true);
common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin', '', '', '', '', $design->program);
?>
<?php
$vars = "design={$design->id}";
common::printIcon('design', 'edit', $vars, $design, 'list', 'fork', '', '', '', '', '', $design->program);
common::printIcon('design', 'commit', $vars, $design, 'list', 'link', '', 'iframe showinonlybody', true);
common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin', '', '', '', '', $design->program);
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php $pager->show('right', 'pagerjs');?>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<?php endif;?>
</div>
<?php include '../../' . 'common/view/footer.html.php';?>
<?php include '../../common/view/footer.html.php';?>
+15 -4
View File
@@ -1,5 +1,16 @@
<?php
/**
* The commit view of design 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 design
* @version $Id: commit.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<style>.m-design-commit{padding-left: 0px;}</style>
<div class='main-content' id='mainContent'>
<div class='main-header'>
<h2>
@@ -9,9 +20,9 @@
</h2>
</div>
<div class='searchBox'>
<h4><?php echo $lang->design->commitDate . ':';?></h4>
<?php echo html::input('begin', $begin, "class='form-control form-date srearch-date'");?>
<span>~</span>
<h4><?php echo $lang->design->commitDate . ':';?></h4>
<?php echo html::input('begin', $begin, "class='form-control form-date srearch-date'");?>
<span>~</span>
<?php echo html::input('end', $end, "class='form-control form-date srearch-date'");?>
</div>
<form id='logForm' class='main-table form-ajax' data-ride='table' action=<?php echo inlink('commit', "designID=$designID");?> method='post'>
+13 -15
View File
@@ -1,3 +1,15 @@
<?php
/**
* The create view of design 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 design
* @version $Id: create.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php
@@ -19,9 +31,7 @@ js::set('showSubHeader', $showSubHeader);
<td></td>
</tr>
<?php endif;?>
<?php if($program->category == 'single'):?>
<?php echo html::hidden('product', $productID);?>
<?php endif;?>
<?php if($program->category == '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>
@@ -54,18 +64,6 @@ js::set('showSubHeader', $showSubHeader);
</div>
</div>
<script>
$('#product').change(function()
{
productID = $(this).val();
var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID);
$.post(link, function(data)
{
$('#story').replaceWith(data);
$('#story_chosen').remove();
$('#story').chosen();
})
})
if(showSubHeader == 'hidden') $("#subHeader").remove();
</script>
<?php include '../../common/view/footer.html.php';?>
+12 -13
View File
@@ -1,10 +1,21 @@
<?php
/**
* The edit view of design 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 design
* @version $Id: edit.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php
$showSubHeader = $program->category == 'single' ? 'hidden' : 'show';
js::set('showSubHeader', $showSubHeader);
?>
<style> .tabs .tab-pane .table{border: 1px solid #ddd; border-top: none} </style>
<div id="mainContent" class="main-content fade">
<div class="center-block">
<div class="main-header">
@@ -90,18 +101,6 @@ js::set('showSubHeader', $showSubHeader);
</div>
</div>
<script>
$('#product').change(function()
{
productID = $(this).val();
var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID);
$.post(link, function(data)
{
$('#story').replaceWith(data);
$('#story_chosen').remove();
$('#story').chosen();
})
})
if(showSubHeader == 'hidden') $("#subHeader").remove();
</script>
<?php include '../../common/view/footer.html.php';?>
+27 -31
View File
@@ -1,19 +1,23 @@
<?php include '../../' . 'common/view/header.html.php';?>
<?php
if(!empty($_GET['onlybody']))
{
$data->commit = '';
foreach($relations as $relation) $data->commit .= " #$relation->BID";
$data->story = $storyTitle;
}
/**
* The view of design 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 design
* @version $Id: view.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a($this->createLink('design', 'browse', "productID=$productID"), '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary'");?>
<div class="divider"></div>
<div class="page-title">
<span class="label label-id"><?php echo $data->id?></span>
<span class="text" title="<?php echo $data->name;?>"><?php echo $data->name;?></span>
<span class="label label-id"><?php echo $design->id?></span>
<span class="text" title="<?php echo $design->name;?>"><?php echo $design->name;?></span>
</div>
</div>
</div>
@@ -23,8 +27,8 @@ if(!empty($_GET['onlybody']))
<div class="detail">
<div class="detail-title"><?php echo $lang->design->desc;?></div>
<div class="detail-content article-content">
<?php echo $data->desc;?>
<?php echo $this->fetch('file', 'printFiles', array('files' => $data->files, 'fieldset' => 'true'));?>
<?php echo $design->desc;?>
<?php echo $this->fetch('file', 'printFiles', array('files' => $design->files, 'fieldset' => 'true'));?>
</div>
</div>
</div>
@@ -33,13 +37,13 @@ if(!empty($_GET['onlybody']))
<div class="btn-toolbar">
<?php common::printBack($this->session->designList);?>
<?php if(!isonlybody()) echo "<div class='divider'></div>";?>
<?php if(!$data->deleted):?>
<?php if(!$design->deleted):?>
<?php
common::printIcon('design', 'commit',"designID=$data->id", $data, 'button', 'link', '', 'iframe showinonlybody', true);
common::printIcon('design', 'edit', "designID=$data->id", $data, 'button', '', '', '', true);
common::printIcon('design', 'delete', "designID=$data->id", $data, 'button', 'trash', 'hiddenwin');
common::printIcon('design', 'commit', "designID=$design->id", $design, 'button', 'link', '', 'iframe showinonlybody', true);
common::printIcon('design', 'edit', "designID=$design->id", $design, 'button', '', '', '', true);
common::printIcon('design', 'delete', "designID=$design->id", $design, 'button', 'trash', 'hiddenwin');
?>
<?php endif;?>
<?php endif;?>
</div>
</div>
</div>
@@ -49,39 +53,31 @@ if(!empty($_GET['onlybody']))
<table class='table table-data'>
<tr>
<th><?php echo $lang->design->type;?></th>
<td><?php echo zget($lang->design->typeList, $data->type);?></td>
<td><?php echo zget($lang->design->typeList, $design->type);?></td>
</tr>
<tr>
<th><?php echo $lang->design->product;?></th>
<td><?php echo $data->productName;?></td>
<td><?php echo $design->productName;?></td>
</tr>
<tr>
<th><?php echo $lang->design->story;?></th>
<td><?php echo $data->story;?></td>
<td><?php echo $design->story;?></td>
</tr>
<tr>
<th><?php echo $lang->design->commit;?></th>
<td><?php echo $data->commit;?></td>
<td><?php echo $design->commit;?></td>
</tr>
<tr>
<th><?php echo $lang->design->createdBy;?></th>
<td><?php echo zget($users, $data->createdBy);?></td>
<td><?php echo zget($users, $design->createdBy);?></td>
</tr>
<tr>
<th><?php echo $lang->design->createdDate;?></th>
<td><?php echo $data->createdDate;?></td>
<td><?php echo $design->createdDate;?></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<script>
$('.main-actions').width($('.main-col').outerWidth());
if(showAction == 'hidden')
{
$('.main-actions').remove();
$('.pull-left').children('a').remove();
};
</script>
<?php include '../../' . 'common/view/footer.html.php';?>
<?php include '../../common/view/footer.html.php';?>