* Improve the problem function module.

This commit is contained in:
leiyong
2020-08-19 15:54:32 +08:00
parent 1288cc0803
commit f84599de14
12 changed files with 852 additions and 94 deletions
+7 -1
View File
@@ -1,6 +1,12 @@
<?php
$config->issue->create = new stdclass();
$config->issue->edit = new stdclass();
$config->issue->create->requiredFields = 'title,type,severity';
$config->issue->edit->requiredFields = 'title,type,severity';
$config->issue->editor = new stdclass();
$config->issue->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
$config->issue->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
$config->issue->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
$config->issue->editor->cancel = array('id' => 'desc', 'tools' => 'simpleTools');
$config->issue->editor->resolve = array('id' => 'resolutionComment', 'tools' => 'simpleTools');
+200 -12
View File
@@ -24,9 +24,23 @@ class issue extends control
*/
public function browse($browseType = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$browseType = strtolower($browseType);
/* Load pager */
$this->app->loadClass('pager', true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$this->view->title = $this->lang->issue->common . $this->lang->colon . $this->lang->issue->browse;
$this->view->position[] = $this->lang->issue->browse;
$this->view->pager = $pager;
$this->view->recTotal = $recTotal;
$this->view->recPerPage = $recPerPage;
$this->view->pageID = $pageID;
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->issueList = $this->issue->getIssueList($browseType, $orderBy, $pager);
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
$this->display();
}
@@ -40,8 +54,9 @@ class issue extends control
{
if($_POST)
{
$result = $this->issue->create();
$issueID = $this->issue->create();
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->loadModel('action')->create('issue', $issueID, 'Opened');
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('browse', 'browseType=all')));
}
@@ -53,8 +68,7 @@ class issue extends control
$this->display();
}
/**
* batchCreate issues
*
@@ -63,20 +77,194 @@ class issue extends control
*/
public function batchCreate()
{
if($_POST)
{
$results = $this->issue->batchCreate();
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('browse', 'browseType=all')));
}
if($_POST)
{
$results = $this->issue->batchCreate();
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('browse', 'browseType=all')));
}
$this->view->title = $this->lang->issue->common . $this->lang->colon . $this->lang->issue->batchCreate;
$this->view->position[] = $this->lang->issue->common;
$this->view->position[] = $this->lang->issue->batchCreate;
$this->view->position[] = $this->lang->issue->batchCreate;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
$this->display();
$this->display();
}
/**
* Delete a issue.
*
* @param int $issueID
* @param string $confirm yes|no
* @access public
* @return void
*/
public function delete($issueID = 0, $confirm = 'no')
{
if($confirm == 'no')
{
die(js::confirm($this->lang->issue->confirmDelete, inLink('delete', "issueID=$issueID&confirm=yes")));
}
else
{
$this->issue->delete($issueID);
die(js::reload('parent'));
}
}
/**
* Edit a issue.
*
* @param int $issueID
* @access public
* @return void
*/
public function edit($issueID)
{
if($_POST)
{
$changes = $this->issue->update($issueID);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Edited');
$this->action->logHistory($actionID, $changes);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('browse', 'browseType=all')));
}
$this->view->title = $this->lang->issue->common . $this->lang->colon . $this->lang->issue->edit;
$this->view->position[] = $this->lang->issue->common;
$this->view->position[] = $this->lang->issue->edit;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
$this->view->issue = $this->issue->getByID($issueID);
$this->display();
}
/**
* Assign a issue.
*
* @param int $issueID
* @access public
* @return void
*/
public function assignTo($issueID)
{
if($_POST)
{
$changes = $this->issue->assignTo($issueID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Edited');
$this->action->logHistory($actionID, $changes);
die(js::closeModal('parent.parent', 'this'));
}
$this->view->issue = $this->issue->getByID($issueID);
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
$this->display();
}
/**
* Close a issue.
*
* @param int $issueID
* @access public
* @return void
*/
public function close($issueID)
{
if($_POST)
{
$changes = $this->issue->close($issueID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Edited');
$this->action->logHistory($actionID, $changes);
die(js::closeModal('parent.parent', 'this'));
}
$this->view->issue = $this->issue->getByID($issueID);
$this->display();
}
/**
* Cancel a issue.
*
* @param int $issueID
* @access public
* @return void
*/
public function cancel($issueID)
{
if($_POST)
{
$changes = $this->issue->cancel($issueID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Edited');
$this->action->logHistory($actionID, $changes);
die(js::closeModal('parent.parent', 'this'));
}
$this->view->issue = $this->issue->getByID($issueID);
$this->display();
}
/**
* Activate a issue.
*
* @param int $issueID
* @access public
* @return void
*/
public function activate($issueID)
{
if($_POST)
{
$changes = $this->issue->activate($issueID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Edited');
$this->action->logHistory($actionID, $changes);
die(js::closeModal('parent.parent', 'this'));
}
$this->view->issue = $this->issue->getByID($issueID);
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
$this->display();
}
/**
* Resolve a issue.
*
* @param int $issue
* @access public
* @return void
*/
public function resolve($issue)
{
if($_POST)
{
$this->issue->resolve($issue);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
}
$this->view->title = $this->lang->issue->resolved;
$this->view->issue = $this->issue->getByID($issue);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->display();
}
>>>>>>> Stashed changes
}
+17 -2
View File
@@ -29,11 +29,16 @@ $lang->issue->assignedBy = '由谁指派';
$lang->issue->assignedDate = '指派时间';
$lang->issue->resolved = '解决';
$lang->issue->create = '新建';
$lang->issue->delete = '删除';
$lang->issue->active = '激活';
$lang->issue->assign = '指派';
$lang->issue->create = '新建问题';
$lang->issue->edit = '编辑问题';
$lang->issue->batchCreate = '批量新建';
$lang->issue->labelList['all'] = '全部';
$lang->issue->labelList['open'] = '开放';
$lang->issue->labelList['assignTo'] = '指派给我';
$lang->issue->labelList['assignto'] = '指派给我';
$lang->issue->labelList['closed'] = '已关闭';
$lang->issue->labelList['suspended'] = '已挂起';
$lang->issue->labelList['cancelled'] = '已取消';
@@ -72,4 +77,14 @@ $lang->issue->statusList['unresolved'] = '正解决';
$lang->issue->statusList['resolved'] = '已解决';
$lang->issue->statusList['canceled'] = '取消';
$lang->issue->statusList['closed'] = '已关闭';
$lang->issue->statusList['active'] = '激活';
$lang->issue->statusList['suspended'] = '挂起';
$lang->issue->resolveMethods = array();
$lang->issue->resolveMethods['resolved'] = '已解决';
$lang->issue->resolveMethods['totask'] = '转任务';
$lang->issue->resolveMethods['tobug'] = '转BUG';
$lang->issue->resolveMethods['tostory'] = '转需求';
$lang->issue->resolveMethods['torisk'] = '转风险';
$lang->issue->confirmDelete = '您确认删除该问题?';
+200 -24
View File
@@ -13,12 +13,20 @@
<?php
class issueModel extends model
{
/**
* Create a question.
*
* @access public
* @return bool
*/
public function create()
{
$now = helper::now();
$data = fixer::input('post')
->add('createdBy', $this->app->user->account)
->add('createdDate', $now)
->add('program', $this->session->program)
->remove('labels,files')
->addIF($this->post->assignedTo, 'assignedBy', $this->app->user->account)
->addIF($this->post->assignedTo, 'assignedDate', $now)
->stripTags($this->config->issue->editor->create['id'], $this->config->allowedTags)
@@ -43,9 +51,178 @@ class issueModel extends model
}
$this->dao->insert(TABLE_ISSUE)->data($data)->exec();
return true;
$issueID = $this->dao->lastInsertID();
$this->loadModel('file')->saveUpload('issue', $issueID);
return $issueID;
}
/**
* Get question list data.
*
* @param string $browseType
* @param string $orderBy
* @param object $pager
* @access public
* @return object
*/
public function getIssueList($browseType = 'all', $orderBy = 'id_desc', $pager = null)
{
$issueList = $this->dao->select('*')->from(TABLE_ISSUE)
->where('program')->eq($this->session->program)
->andWhere('deleted')->eq('0')
->beginIF($browseType == 'open')->andWhere('status')->eq('active')->fi()
->beginIF($browseType == 'assignto')->andWhere('assignedTo')->eq($this->app->user->account)->fi()
->beginIF($browseType == 'closed')->andWhere('status')->eq('closed')->fi()
->beginIF($browseType == 'suspended')->andWhere('status')->eq('suspended')->fi()
->beginIF($browseType == 'cancelled')->andWhere('status')->eq('canceled')->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll();
return $issueList;
}
/**
* Delete a question.
*
* @param int $issueID
* @param int $null
* @access public
* @return object
*/
public function delete($issueID = 0, $null = null)
{
$this->dao->update(TABLE_ISSUE)->set('deleted')->eq('1')->where('id')->eq($issueID)->exec();
}
/**
* Get a issue details.
*
* @param int $issueID
* @access public
* @return object
*/
public function getByID($issueID)
{
return $this->dao->select('*')->from(TABLE_ISSUE)->where('id')->eq($issueID)->andWhere('deleted')->eq('0')->fetch();
}
/**
* Update a question.
*
* @param int $issueID
* @access public
* @return bool
*/
public function update($issueID)
{
$now = helper::now();
$data = fixer::input('post')
->add('editedBy', $this->app->user->account)
->add('editedDate', $now)
->addIF($this->post->assignedTo, 'assignedBy', $this->app->user->account)
->addIF($this->post->assignedTo, 'assignedDate', $now)
->stripTags($this->config->issue->editor->edit['id'], $this->config->allowedTags)
->get();
if(strpos($this->config->issue->edit->requiredFields, 'type') !== false and !$this->post->type)
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->issue->type);
return false;
}
if(strpos($this->config->issue->edit->requiredFields, 'title') !== false and !$this->post->title)
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->issue->title);
return false;
}
if(strpos($this->config->issue->edit->requiredFields, 'severity') !== false and !$this->post->severity)
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->issue->severity);
return false;
}
$oldIssue = $this->getByID($issueID);
$this->dao->update(TABLE_ISSUE)->data($data)->where('id')->eq($issueID)->exec();
return common::createChanges($oldIssue, $data);
}
/**
* Update assignor.
*
* @param int $issueID
* @access public
* @return bool
*/
public function assignTo($issueID)
{
$data = fixer::input('post')
->add('assignedBy', $this->app->user->account)
->add('assignedDate', helper::now())
->get();
$oldIssue = $this->getByID($issueID);
$this->dao->update(TABLE_ISSUE)->data($data)->where('id')->eq($issueID)->exec();
return common::createChanges($oldIssue, $data);
}
/**
* Close issue.
*
* @param int $issueID
* @access public
* @return bool
*/
public function close($issueID)
{
$data = fixer::input('post')
->add('closeBy', $this->app->user->account)
->add('status', 'closed')
->get();
$oldIssue = $this->getByID($issueID);
$this->dao->update(TABLE_ISSUE)->data($data)->where('id')->eq($issueID)->exec();
return common::createChanges($oldIssue, $data);
}
/**
* Cancel issue.
*
* @param int $issueID
* @access public
* @return bool
*/
public function cancel($issueID)
{
$data = fixer::input('post')->get();
$oldIssue = $this->getByID($issueID);
$this->dao->update(TABLE_ISSUE)->data($data)->where('id')->eq($issueID)->exec();
return common::createChanges($oldIssue, $data);
}
/**
* Activate issue.
*
* @param int $issueID
* @access public
* @return bool
*/
public function activate($issueID)
{
$data = fixer::input('post')
->add('status', 'active')
->get();
$oldIssue = $this->getByID($issueID);
$this->dao->update(TABLE_ISSUE)->data($data)->where('id')->eq($issueID)->exec();
return common::createChanges($oldIssue, $data);
}
/**
* Batch create issue.
*
@@ -55,33 +232,32 @@ class issueModel extends model
public function batchCreate()
{
$now = helper::now();
$data = fixer::input('post')->get();
$data = fixer::input('post')->get();
$issues = array();
foreach($data->dataList as $issue)
{
if(!trim($issue['title'])) continue;
$issues = array();
foreach($data->dataList as $issue)
{
if(!trim($issue['title'])) continue;
$issue['createdBy'] = $this->app->user->account;
$issue['createdDate'] = $now;
$issue['createdBy'] = $this->app->user->account;
$issue['createdDate'] = $now;
if($issue['assignedTo'])
{
$issue['assignedBy'] = $this->app->user->account;
$issue['assignedDate'] = $now;
}
if($issue['assignedTo'])
{
$issue['assignedBy'] = $this->app->user->account;
$issue['assignedDate'] = $now;
}
foreach(explode(',',$this->config->issue->create->requiredFields) as $field)
{
$field = trim($field);
if($field and empty($issue["$field"])) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->issue->$field)));
}
foreach(explode(',',$this->config->issue->create->requiredFields) as $field)
{
$field = trim($field);
if($field and empty($issue["$field"])) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->issue->$field)));
}
$issues[] = $issue;
}
$issues[] = $issue;
}
foreach($issues as $issue) $this->dao->insert(TABLE_ISSUE)->data($issue)->exec();
foreach($issues as $issue) $this->dao->insert(TABLE_ISSUE)->data($issue)->exec();
return true;
return true;
}
}
+43
View File
@@ -0,0 +1,43 @@
<?php
/**
* The active of issue 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 Jia Fu <fujia@cnezsoft.com>
* @package issue
* @version $Id: complete.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $issue->id;?></span>
<?php echo "<span title='$issue->title'>" . $issue->title . '</span>';?>
</div>
</div>
<div class="modal-body" style="min-height: 282px; overflow: auto;">
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->issue->activateBy;?></th>
<td colspan='2'><?php echo html::select('activateBy', $users, '', 'class="form-control chosen"');?></td>
</tr>
<tr>
<th><?php echo $lang->issue->activateDate;?></th>
<td colspan='2'><?php echo html::input('activateDate', helper::now(), 'class="form-control form-datetime"');?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+39
View File
@@ -0,0 +1,39 @@
<?php
/**
* The assign of issue 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 Jia Fu <fujia@cnezsoft.com>
* @package issue
* @version $Id: complete.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $issue->id;?></span>
<?php echo "<span title='$issue->title'>" . $issue->title . '</span>';?>
</div>
</div>
<div class="modal-body" style="min-height: 282px; overflow: auto;">
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->issue->assignedTo;?></th>
<td colspan='2'><?php echo html::select('assignedTo', $users, $issue->assignedTo, 'class="form-control chosen"');?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+64 -4
View File
@@ -1,24 +1,84 @@
<?php
/**
* The batch close view of story module of ZenTaoPMS.
* The browse view of issue 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 Congzhi Chen <congzhi@cnezsoft.com>
* @package story
* @package issue
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a($this->createLink('issue', 'browse', 'browseType=all'), '<span class="text">' . $lang->issue->browse . '</span>', '', 'class="btn btn-link btn-active-text"');?>
<?php
foreach($lang->issue->labelList as $label => $labelName)
{
$active = $browseType == $label ? 'btn-active-text' : '';
echo html::a($this->createLink('issue', 'browse', 'browseType=' . $label), '<span class="text">' . $labelName . '</span>', '', "class='btn btn-link $active'");
}
?>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('issue', 'create', '', "<i class='icon icon-plus'></i>" . $lang->issue->create, '', "class='btn btn-primary'");?>
<?php common::printLink('issue', 'batchCreate', '', "<i class='icon icon-plus'></i>" . $lang->issue->batchCreate, '', "class='btn btn-primary'");?>
</div>
</div>
<div id="mainContent" class="main-row">
<div class="main-col">
<?php if($issueList):?>
<form class="main-table" data-ride="table" method="post" id="issueForm">
<table id="issueList" class="table has-sort-head" id="issueTable">
<thead>
<tr>
<?php $vars = "browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<th class="c-id w-40px"><?php echo common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class="w-40px"><?php echo $lang->issue->type;?></th>
<th class="w-100px"><?php echo $lang->issue->title;?></th>
<th class="w-40px"><?php echo $lang->issue->severity;?></th>
<th class="w-40px"><?php echo $lang->issue->pri;?></th>
<th class="w-60px"><?php echo $lang->issue->assignedTo;?></th>
<th class="w-60px"><?php echo $lang->issue->owner;?></th>
<th class="w-60px"><?php echo $lang->issue->status;?></th>
<th class="w-80px"><?php echo $lang->issue->createdDate;?></th>
<th class="c-actions w-100px"><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($issueList as $id => $issue):?>
<tr>
<td class="c-id"><?php printf('%03d', $issue->id);?></td>
<td title="<?php echo zget($lang->issue->typeList, $issue->type);?>"><?php echo zget($lang->issue->typeList, $issue->type);?></td>
<td title="<?php echo $issue->title;?>"><?php echo $issue->title;?></td>
<td title="<?php echo $issue->severity;?>"><?php echo $issue->severity;?></td>
<td title="<?php echo $issue->pri;?>"><?php echo $issue->pri;?></td>
<td title="<?php echo zget($users, $issue->assignedTo);?>"><?php echo zget($users, $issue->assignedTo);?></td>
<td title="<?php echo zget($users, $issue->owner);?>"><?php echo zget($users, $issue->owner);?></td>
<td title="<?php echo zget($lang->issue->statusList, $issue->status);?>"><?php echo zget($lang->issue->statusList, $issue->status);?></td>
<td title="<?php echo $issue->createdDate;?>"><?php echo $issue->createdDate;?></td>
<td class="c-actions">
<?php
echo common::printIcon('issue', 'resolve', "issueID=$issue->id", $issue, 'list', 'checked', '', 'iframe', 'yes');
echo common::printIcon('issue', 'assignTo', "issueID=$issue->id", $issue, 'list', 'hand-right', '', 'iframe', 'yes');
echo common::printIcon('issue', 'close', "issueID=$issue->id", $issue, 'list', 'off', '', 'iframe', 'yes');
echo common::printIcon('issue', 'cancel', "issueID=$issue->id", $issue, 'list', 'ban-circle', '', 'iframe', 'yes');
echo common::printIcon('issue', 'activate', "issueID=$issue->id", $issue, 'list', 'magic', '', 'iframe', 'yes');
echo common::printIcon('issue', 'edit', "issueID=$issue->id", $issue, 'list', 'edit');
$deleteClass = common::hasPriv('issue', 'delete') ? 'btn' : 'btn disabled';
echo html::a($this->createLink('issue', 'delete', "issueID=$issue->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->issue->delete}' class='$deleteClass'");
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</form>
<?php else:?>
<div class="table-empty-tip"><?php echo $lang->noData;?></div>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+48
View File
@@ -0,0 +1,48 @@
<?php
/**
* The cancel of issue 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 Jia Fu <fujia@cnezsoft.com>
* @package issue
* @version $Id: complete.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $issue->id;?></span>
<?php echo "<span title='$issue->title'>" . $issue->title . '</span>';?>
</div>
</div>
<div class="modal-body" style="min-height: 282px; overflow: auto;">
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->issue->title;?></th>
<td colspan='2'><?php echo $issue->title;?></td>
</tr>
<tr>
<th><?php echo $lang->issue->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', $issue->desc, 'row="6"');?></td>
</tr>
<tr>
<th><?php echo $lang->issue->status;?></th>
<td colspan='2'><?php echo html::select('status', $lang->issue->statusList, 'canceled', 'class="form-control chosen"');?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+43
View File
@@ -0,0 +1,43 @@
<?php
/**
* The close of issue 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 Jia Fu <fujia@cnezsoft.com>
* @package issue
* @version $Id: complete.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $issue->id;?></span>
<?php echo "<span title='$issue->title'>" . $issue->title . '</span>';?>
</div>
</div>
<div class="modal-body" style="min-height: 282px; overflow: auto;">
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->issue->closedDate;?></th>
<td colspan='2'><?php echo html::input('closedDate', helper::now(), 'class="form-control form-datetime"');?></td>
</tr>
<tr>
<th><?php echo $lang->issue->resolution;?></th>
<td colspan='2'><?php echo html::select('resolution', $lang->issue->resolutionList, '', 'class="form-control chosen"');?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+55 -51
View File
@@ -1,11 +1,11 @@
<?php
/**
* The batch close view of story module of ZenTaoPMS.
* The create view of issue 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 Congzhi Chen <congzhi@cnezsoft.com>
* @package story
* @package issue
* @version $Id$
* @link http://www.zentao.net
*/
@@ -17,55 +17,59 @@
<div class="main-header">
<h2><?php echo $lang->issue->create;?></h2>
</div>
<form method="post" class="main-form form-ajax" enctype="multipart/form-data" id="issueForm">
<table class="table table-form">
<tbody>
<tr>
<th><?php echo $lang->issue->type;?></th>
<td class="required"><?php echo html::select('type', $lang->issue->typeList, '', 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->title;?></th>
<td class="required"><?php echo html::input('title', '', 'class="form-control"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->severity;?></th>
<td class="required"><?php echo html::select('severity', $lang->issue->serverityList, '', 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->pri;?></th>
<td><?php echo html::select('pri', $lang->issue->priList, '', 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->deadline;?></th>
<td><?php echo html::input('deadline', '', 'class="form-control form-date"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, '', 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->desc;?></th>
<td colspan="3"><?php echo html::textarea('desc', '', 'row="6"');?></td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . html::backButton();?></td>
</tr>
</tbody>
</table>
</form>
</div>
<form method="post" class="main-form form-ajax" enctype="multipart/form-data" id="issueForm">
<table class="table table-form">
<tbody>
<tr>
<th><?php echo $lang->issue->type;?></th>
<td class="required"><?php echo html::select('type', $lang->issue->typeList, '', 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->title;?></th>
<td class="required"><?php echo html::input('title', '', 'class="form-control"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->severity;?></th>
<td class="required"><?php echo html::select('severity', $lang->issue->serverityList, '', 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->pri;?></th>
<td><?php echo html::select('pri', $lang->issue->priList, '', 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->deadline;?></th>
<td><?php echo html::input('deadline', '', 'class="form-control form-date"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, '', 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->desc;?></th>
<td colspan="3"><?php echo html::textarea('desc', '', 'row="6"');?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . html::backButton();?></td>
</tr>
</tbody>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+71
View File
@@ -0,0 +1,71 @@
<?php
/**
* The edit view of issue 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 Congzhi Chen <congzhi@cnezsoft.com>
* @package issue
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div class="main-content" id="mainCentent">
<div class="center-block">
<div class="main-header">
<h2><?php echo $lang->issue->edit;?></h2>
</div>
<form method="post" class="main-form form-ajax" enctype="multipart/form-data" id="issueForm">
<table class="table table-form">
<tbody>
<tr>
<th><?php echo $lang->issue->type;?></th>
<td class="required"><?php echo html::select('type', $lang->issue->typeList, $issue->type, 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->title;?></th>
<td class="required"><?php echo html::input('title', $issue->title, 'class="form-control"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->severity;?></th>
<td class="required"><?php echo html::select('severity', $lang->issue->serverityList, $issue->severity, 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->pri;?></th>
<td><?php echo html::select('pri', $lang->issue->priList, $issue->pri, 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->deadline;?></th>
<td><?php echo html::input('deadline', $issue->deadline, 'class="form-control form-date"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, $issue->assignedTo, 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->desc;?></th>
<td colspan="3"><?php echo html::textarea('desc', $issue->desc, 'row="6"');?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . html::backButton();?></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+65
View File
@@ -0,0 +1,65 @@
<?php
include '../../common/view/header.html.php';
include '../../common/view/kindeditor.html.php';
include '../../common/view/datepicker.html.php';
?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $issue->id;?></span>
<?php echo "<span title='$issue->title'>" . $issue->title . '</span>';?>
</div>
</div>
<div class="modal-body" style="min-height: 282px; overflow: auto;">
<form id='ajaxForm' class="form-ajax" method='post'>
<table class="table table-form">
<tr>
<th><?php echo $lang->issue->resolution;?></th>
<td>
<?php echo html::select('resolution', $lang->issue->resolveMethods, 'resolved', "class='form-control chosen'");?>
</td>
</tr>
<tr class='resolvedTR'>
<th><?php echo $lang->issue->resolutionComment;?></th>
<td colspan='3'><textarea name='resolutionComment' class='form-control' rows='5' id='resolutionComment'><?php echo $issue->resolutionComment;?></textarea></td>
</tr>
<tr>
<th><?php echo $lang->issue->resolvedBy;?></th>
<td>
<?php echo html::select('resolvedBy', $users, $this->app->user->account, "class='form-control chosen'");?>
</td>
</tr>
<tr>
<th><?php echo $lang->issue->resolvedDate;?></th>
<td>
<div class='input-group has-icon-right'>
<?php echo html::input('resolvedDate', date('Y-m-d'), "class='form-control form-date'");?>
<label for="date" class="input-control-icon-right"><i class="icon icon-delay"></i></label>
</div>
</td>
</tr>
<tr>
<td></td>
<td>
<div class='form-action'><?php echo html::submitButton();?></div>
</td>
</tr>
</table>
</form>
</div>
</div>
<script>
$().ready(function()
{
$('#issueresolution').change(function()
{
if($(this).val() == 'resolved') $('.resolvedTR').show().find('input[type=text],input[type=radio],input[type=checkbox],select,textarea').prop('disabled', false);
if($(this).val() == 'tobug') $('.bugTR').show().find('input[type=text],input[type=radio],input[type=checkbox],select,textarea').prop('disabled', false);
if($(this).val() == 'totask') $('.taskTR').show().find('input[type=text],input[type=radio],input[type=checkbox],select,textarea').prop('disabled', false);
if($(this).val() == 'tostory') $('.storyTR').show().find('input[type=text],input[type=radio],input[type=checkbox],select,textarea').prop('disabled', false);
if($(this).val() == 'torisk') $('.riskTR').show().find('input[type=text],input[type=radio],input[type=checkbox],select,textarea').prop('disabled', false);
})
});
</script>
<?php include '../../common/view/footer.html.php';?>