This commit is contained in:
Yagami
2020-08-19 17:34:49 +08:00
29 changed files with 1448 additions and 101 deletions
+8 -8
View File
@@ -148,23 +148,23 @@ CREATE TABLE `zt_risk` (
`remedy` text NOT NULL,
`plannedClosedDate` date NOT NULL,
`actualClosedDate` date NOT NULL,
`addedDate` date NOT NULL,
`createdBy` varchar(30) NOT NULL,
`createdDate` datetime NOT NULL,
`editedBy` varchar(30) NOT NULL,
`editedDate` datetime NOT NULL,
`resolution` text NOT NULL,
`resolvedBy` varchar(30) NOT NULL,
`activateBy` varchar(30) NOT NULL,
`activateDate` date NOT NULL,
`closeBy` varchar(30) NOT NULL,
`closedDate` date NOT NULL,
`assignedTo` varchar(30) NOT NULL,
`assignedBy` varchar(30) NOT NULL,
`cancelBy` varchar(30) NOT NULL,
`cancelDate` datetime NOT NULL,
`cancelDate` date NOT NULL,
`cancelReason` char(30) NOT NULL,
`hangupBy` varchar(30) NOT NULL,
`hangupdDate` datetime NOT NULL,
`hangupdDate` date NOT NULL,
`trackedBy` varchar(30) NOT NULL,
`trackedDate` datetime NOT NULL,
`assignedDate` datetime NOT NULL,
`trackedDate` date NOT NULL,
`assignedDate` date NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+1 -4
View File
@@ -133,10 +133,7 @@ $lang->custom->productProject->relation['1_2'] = 'Project - Sprint';
$lang->custom->productProject->notice = 'Please select a concept according to your team.';
$lang->custom->workingList['full'] = 'Full Management of Dev';
$lang->custom->workingList['onlyTest'] = 'Test Management';
$lang->custom->workingList['onlyStory'] = 'Story Management';
$lang->custom->workingList['onlyTask'] = 'Task Management';
$lang->custom->workingList['full'] = 'Full Management of Dev';
$lang->custom->menuTip = 'Click to show/hide navigation bar. Drag to swtich display order.';
$lang->custom->saveFail = 'Failed to save!';
+1 -4
View File
@@ -173,10 +173,7 @@ $lang->custom->productProject->relation['0_1'] = 'Program - Product - Sprint';
$lang->custom->productProject->notice = 'Select a concept that fits your team.';
$lang->custom->workingList['full'] = 'Application Lifecycle Management';
$lang->custom->workingList['onlyTest'] = 'Test Management';
$lang->custom->workingList['onlyStory'] = 'Story Management';
$lang->custom->workingList['onlyTask'] = 'Task Management';
$lang->custom->workingList['full'] = 'Application Lifecycle Management';
$lang->custom->menuTip = 'Click to show/hide the menu. Drag to switch display order.';
$lang->custom->saveFail = 'Failed to save!';
+1 -4
View File
@@ -133,10 +133,7 @@ $lang->custom->productProject->relation['1_2'] = 'Project - Sprint';
$lang->custom->productProject->notice = 'Sélectionnez le concept qui correspond à votre équipe.';
$lang->custom->workingList['full'] = 'Application Lifecycle Management';
$lang->custom->workingList['onlyTest'] = 'Gestion de la Qualité';
$lang->custom->workingList['onlyStory'] = 'Gestion des Stories';
$lang->custom->workingList['onlyTask'] = 'Gestion des Tâches';
$lang->custom->workingList['full'] = 'Application Lifecycle Management';
$lang->custom->menuTip = "Cliquez pour montrer/cacher le menu. Déplacez pour changer l'ordre d'affichage.";
$lang->custom->saveFail = 'Echec de la sauvegarde !';
+1 -4
View File
@@ -173,10 +173,7 @@ $lang->custom->productProject->relation['0_1'] = '项目 - 产品 - 冲刺';
$lang->custom->productProject->notice = '请根据实际情况选择适合自己团队的概念。';
$lang->custom->workingList['full'] = '完整研发管理工具';
$lang->custom->workingList['onlyTest'] = '测试管理工具';
$lang->custom->workingList['onlyStory'] = "{$lang->storyCommon}管理工具";
$lang->custom->workingList['onlyTask'] = '任务管理工具';
$lang->custom->workingList['full'] = '完整研发管理工具';
$lang->custom->menuTip = '点击显示或隐藏导航条目,拖拽来更改显示顺序。';
$lang->custom->saveFail = '保存失败!';
+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');
+247 -1
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,4 +68,235 @@ class issue extends control
$this->display();
}
/**
* batchCreate issues
*
* @access public
* @return void
*/
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')));
}
$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->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
$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();
}
/**
* Get question details.
*
* @param int $issueID
* @access public
* @return void
*/
public function view($issueID)
{
$this->commonAction($issueID, 'issue');
$issue = $this->issue->getByID($issueID);
$this->view->title = $this->lang->issue->common . $this->lang->colon . $issue->title;
$this->view->position[] = $this->lang->issue->common;
$this->view->position[] = $this->lang->issue->basicInfo;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
$this->view->issue = $issue;
$this->display();
}
/**
* Common actions of issue module.
*
* @param int $issueID
* @access public
* @return void
*/
public function commonAction($issueID, $object)
{
$this->view->actions = $this->loadModel('action')->getList($object, $issueID);
}
}
+18 -2
View File
@@ -29,11 +29,17 @@ $lang->issue->assignedBy = '由谁指派';
$lang->issue->assignedDate = '指派时间';
$lang->issue->resolved = '解决';
$lang->issue->create = '新建';
$lang->issue->delete = '删除';
$lang->issue->basicInfo = '基本信息';
$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 +78,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 = '您确认删除该问题?';
+216 -1
View File
@@ -13,12 +13,20 @@
<?php
class issueModel extends model
{
/**
* Create a question.
*
* @access public
* @return bool
*/
public function create()
{
$now = helper::now();
$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,6 +51,213 @@ class issueModel extends model
}
$this->dao->insert(TABLE_ISSUE)->data($data)->exec();
$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.
*
* @access public
* @return void
*/
public function batchCreate()
{
$now = helper::now();
$data = fixer::input('post')->get();
$issues = array();
foreach($data->dataList as $issue)
{
if(!trim($issue['title'])) continue;
$issue['createdBy'] = $this->app->user->account;
$issue['createdDate'] = $now;
$issue['program'] = $this->session->program;
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)));
}
$issues[] = $issue;
}
foreach($issues as $issue) $this->dao->insert(TABLE_ISSUE)->data($issue)->exec();
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';?>
+66
View File
@@ -0,0 +1,66 @@
<?php
/**
* The batch create close 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';?>
<div id = "mainContent" class="main-content fade in">
<div class="main-header">
<h2><?php echo $lang->issue->batchCreate;?></h2>
</div>
<form id="batchCreateForm" class="form-ajax" method="post">
<table class="table table-form">
<thead>
<tr class="text-center">
<th class="required"><?php echo $lang->issue->title;?></th>
<th class="w-140px required"><?php echo $lang->issue->type;?></th>
<th class="w-120px required"><?php echo $lang->issue->severity;?></th>
<th class="w-150px"><?php echo $lang->issue->desc;?></th>
<th class="w-100px"><?php echo $lang->issue->pri;?></th>
<th class="w-120px"><?php echo $lang->issue->deadline;?></th>
<th class="w-120px"><?php echo $lang->issue->assignedTo;?></th>
</tr>
</thead>
<tbody>
<?php for($i = 1;$i <= 10;$i++):?>
<tr data-key="<?php echo $i;?>">
<td>
<?php echo html::input("dataList[$i][title]", '', 'id="dataList'.$i.'title" class="form-control" autocomplete="off"')?>
</td>
<td>
<?php echo html::select("dataList[$i][type]", $lang->issue->typeList, '', 'class="form-control chosen chosen-controled" id="dataList'.$i.'type"')?>
</td>
<td>
<?php echo html::select("dataList[$i][severity]", $lang->issue->serverityList, '', 'class="form-control chosen chosen-controled" id="dataList'.$i.'severity"')?>
</td>
<td>
<?php echo html::textarea("dataList[$i][desc]", '', 'class="form-control" id="dataList'.$i.'desc" rows="1"');?>
</td>
<td>
<?php echo html::select("dataList[$i][pri]", $lang->issue->priList, '', 'class="form-control chosen chosen-controled" id="dataList'.$i.'pri"')?>
</td>
<td>
<?php echo html::input("dataList[$i][deadline]", '', 'class="form-control form-date" id="dataList'.$i.'deadline"');?>
</td>
<td>
<?php echo html::select("dataList[$i][assignedTo]", $users, '', 'class="form-control chosen chosen-controled" id="dataList'.$i.'assignedTo"')?>
</td>
</tr>
<?php endfor;?>
</tbody>
</table>
<div class="form-actions text-center">
<?php echo html::submitButton('','id="submit" class="btn btn-primary" data-loading="稍后..."')?>
<?php echo html::a('javascript:history.go(-1);', '返回', '', 'class="btn btn-back btn-wide"')?>
</div>
</form>
</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 common::printLink('issue', 'view', "id=$issue->id", $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';?>
+76
View File
@@ -0,0 +1,76 @@
<?php
/**
* The details view of issue module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology C
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Congzhi Chen <congzhi@cnezsoft.com>
* @package issue
* @version $Id: edit.html.php 4488 2013-02-27 02:54:49Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php
$browseLink = $this->createLink('issue', 'browse');
$createLink = $this->createLink('issue', 'create');
?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php if(!isonlybody()):?>
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i>' . $lang->goback, '', 'class="btn btn-secondary"');?>
<div class="divider"></div>
<?php endif;?>
<div class="page-title">
<span class="label label-id"><?php echo $issue->id?></span>
<span class="text" title="<?php echo $issue->title?>"><?php echo $issue->title?></span>
</div>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::hasPriv('issue', 'create')) echo html::a($createLink, "<i class='icon icon-plus'></i> {$lang->issue->create}", '', "class='btn btn-primary'");?>
</div>
</div>
<div class="main-row" id="mainContent">
<div class="main-col col-8">
<div class="cell">
<div class="detail">
<p><strong>标题</strong> - 设计出现偏差,需求重新设计</p>
<p><strong>标题</strong> - 设计出现偏差,需求重新设计</p>
</div>
<div class="detail">
<div class="detail-title"><?php echo $lang->issue->desc;?></div>
<div class="detail-content article-content">
<?php echo !empty($issue->desc) ? $issue->desc : '<div class="text-center text-muted">' . $lang->noData . '</div>';?>
</div>
</div>
</div>
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=issue&objectID=$issue->id");?>
<div class="cell"><?php include '../../common/view/action.html.php';?></div>
</div>
<div class="side-col col-4">
<div class="cell">
<div class="tabs">
<ul class="nav nav-tabs">
<li class="active">
<a href="#basicInfo" data-toggle="tab"><?php echo $lang->issue->basicInfo;?></a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="basicInfo">
<table class="table table-data">
<tbody>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->type;?></th>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+1
View File
@@ -63,6 +63,7 @@ class programModel extends model
$this->lang->project->team = $this->lang->project->teamname;
$project = fixer::input('post')
->setDefault('status', 'wait')
->add('type', 'program')
->setIF($this->post->acl != 'custom', 'whitelist', '')
->setDefault('openedBy', $this->app->user->account)
->setDefault('openedDate', helper::now())
+52
View File
@@ -6,6 +6,58 @@ $config->risk->editor->assignto = array('id' => 'comment', 'tools' => 'simpleToo
$config->risk->editor->cancel = array('id' => 'comment', 'tools' => 'simpleTools');
$config->risk->editor->close = array('id' => 'resolution', 'tools' => 'simpleTools');
$config->risk->editor->track = array('id' => 'prevention,resolution,comment', 'tools' => 'simpleTools');
$config->risk->editor->view = array('id' => 'lastComment', 'tools' => 'simpleTools');
$config->risk->create = new stdclass();
$config->risk->create->requiredFields = 'name';
global $lang;
$config->risk->search['module'] = 'bug';
$config->risk->search['fields']['id'] = $lang->risk->id;
$config->risk->search['fields']['name'] = $lang->risk->name;
$config->risk->search['fields']['source'] = $lang->risk->source;
$config->risk->search['fields']['categroy'] = $lang->risk->category;
$config->risk->search['fields']['strategy'] = $lang->risk->strategy;
$config->risk->search['fields']['status'] = $lang->risk->status;
$config->risk->search['fields']['impact'] = $lang->risk->impact;
$config->risk->search['fields']['probability'] = $lang->risk->probability;
$config->risk->search['fields']['riskindex'] = $lang->risk->riskindex;
$config->risk->search['fields']['pri'] = $lang->risk->pri;
$config->risk->search['fields']['identifiedDate'] = $lang->risk->identifiedDate;
$config->risk->search['fields']['prevention'] = $lang->risk->prevention;
$config->risk->search['fields']['remedy'] = $lang->risk->remedy;
$config->risk->search['fields']['resolution'] = $lang->risk->resolution;
$config->risk->search['fields']['plannedClosedDate'] = $lang->risk->plannedClosedDate;
$config->risk->search['fields']['actualClosedDate'] = $lang->risk->actualClosedDate;
$config->risk->search['fields']['createdBy'] = $lang->risk->createdBy;
$config->risk->search['fields']['createdDate'] = $lang->risk->createdDate;
$config->risk->search['fields']['resolvedBy'] = $lang->risk->resolvedBy;
$config->risk->search['fields']['activateBy'] = $lang->risk->activateBy;
$config->risk->search['fields']['assignedTo'] = $lang->risk->assignedTo;
$config->risk->search['fields']['cancelBy'] = $lang->risk->cancelBy;
$config->risk->search['fields']['hangupBy'] = $lang->risk->hangupBy;
$config->risk->search['fields']['trackedBy'] = $lang->risk->trackedDate;
$config->risk->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
$config->risk->search['params']['source'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->risk->sourceList);
$config->risk->search['params']['category'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->risk->categoryList);
$config->risk->search['params']['strategy'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->risk->strategyList);
$config->risk->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->risk->status);
$config->risk->search['params']['impact'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->risk->impactList);
$config->risk->search['params']['probability'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->risk->probabilityList);
$config->risk->search['params']['riskindex'] = array('operator' => '=', 'control' => 'input', 'values' => '');
$config->risk->search['params']['pri'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->risk->priList);
$config->risk->search['params']['identifiedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->risk->search['params']['prevention'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
$config->risk->search['params']['remedy'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
$config->risk->search['params']['plannedClosedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->risk->search['params']['actualClosedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->risk->search['params']['createBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->risk->search['params']['createDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->risk->search['params']['resolution'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
$config->risk->search['params']['resolvedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->risk->search['params']['activateBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->risk->search['params']['assignedTo'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->risk->search['params']['cancelBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->risk->search['params']['hangupBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->risk->search['params']['trackedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
+45 -9
View File
@@ -1,8 +1,14 @@
<?php
class risk extends control
{
public function browse($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($browseType = 'browse', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
/* Build the search form. */
$actionURL = $this->createLink('risk', 'browse', "browseType=bySearch&queryID=myQueryID");
$this->config->risk->search['onMenuBar'] = 'yes';
$this->risk->buildSearchForm($queryID, $actionURL);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
if($this->app->getViewType() == 'mhtml') $recPerPage = 10;
@@ -11,6 +17,8 @@ class risk extends control
$this->view->title = $this->lang->risk->common . $this->lang->colon . $this->lang->risk->browse;
$this->view->position[] = $this->lang->risk->browse;
$this->view->risks = $this->risk->getList($orderBy, $pager);
$this->view->browseType = $browseType;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
@@ -68,7 +76,7 @@ class risk extends control
$this->send($response);
}
$this->view->risk = $this->risk->getByID($riskID);
$this->view->risk = $this->risk->getById($riskID);
$this->view->users = $this->loadModel('user')->getPairs();
$this->view->title = $this->lang->risk->common . $this->lang->colon . $this->lang->risk->edit;
$this->view->position[] = $this->lang->risk->edit;
@@ -76,6 +84,34 @@ class risk extends control
$this->display();
}
public function view($riskID)
{
$this->loadModel('action');
$this->view->risk = $this->risk->getById($riskID);
$this->view->actions = $this->action->getList('risk', $riskID);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->display();
}
public function delete($riskID, $confirm = 'no')
{
$risk = $this->risk->getById($riskID);
if($confirm == 'no')
{
echo js::confirm($this->lang->risk->confirmDelete, $this->createLink('risk', 'delete', "risk=$riskID&confirm=yes"), '');
exit;
}
else
{
$this->risk->delete(TABLE_RISK, $riskID);
die(js::locate(inlink('browse'), 'parent'));
}
}
public function track($riskID)
{
if($_POST)
@@ -98,7 +134,7 @@ class risk extends control
$response['locate'] = inlink('browse');
$this->send($response);
}
$this->view->risk = $this->risk->getByID($riskID);
$this->view->risk = $this->risk->getById($riskID);
$this->view->users = $this->loadModel('user')->getPairs();
$this->view->title = $this->lang->risk->common . $this->lang->colon . $this->lang->risk->track;
$this->view->position[] = $this->lang->risk->track;
@@ -120,7 +156,7 @@ class risk extends control
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('risk', 'browse'), 'parent'));
}
$risk = $this->risk->getByID($riskID);
$risk = $this->risk->getById($riskID);
$this->view->users = $this->loadModel('user')->getPairs();
$this->view->title = $this->lang->risk->common . $this->lang->colon . $this->lang->risk->assignedTo;
@@ -144,7 +180,7 @@ class risk extends control
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('risk', 'browse'), 'parent'));
}
$risk = $this->risk->getByID($riskID);
$risk = $this->risk->getById($riskID);
$this->view->users = $this->loadModel('user')->getPairs();
$this->view->title = $this->lang->risk->common . $this->lang->colon . $this->lang->risk->cancel;
@@ -167,7 +203,7 @@ class risk extends control
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('risk', 'browse'), 'parent'));
}
$risk = $this->risk->getByID($riskID);
$risk = $this->risk->getById($riskID);
$this->view->users = $this->loadModel('user')->getPairs();
$this->view->title = $this->lang->risk->common . $this->lang->colon . $this->lang->risk->close;
@@ -190,7 +226,7 @@ class risk extends control
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('risk', 'browse'), 'parent'));
}
$risk = $this->risk->getByID($riskID);
$risk = $this->risk->getById($riskID);
$this->view->users = $this->loadModel('user')->getPairs();
$this->view->title = $this->lang->risk->common . $this->lang->colon . $this->lang->risk->hangup;
@@ -207,13 +243,13 @@ class risk extends control
if(dao::isError()) die(js::error(dao::getError()));
$this->loadModel('action');
$actionID = $this->action->create('risk', $riskID, 'Hangup', $this->post->comment);
$actionID = $this->action->create('risk', $riskID, 'Activated', $this->post->comment);
$this->action->logHistory($actionID, $changes);
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('risk', 'browse'), 'parent'));
}
$risk = $this->risk->getByID($riskID);
$risk = $this->risk->getById($riskID);
$this->view->users = $this->loadModel('user')->getPairs();
$this->view->title = $this->lang->risk->common . $this->lang->colon . $this->lang->risk->activate;
+17
View File
@@ -9,6 +9,12 @@ $lang->risk->hangup = '挂起';
$lang->risk->close = '关闭';
$lang->risk->cancel = '取消';
$lang->risk->track = '跟踪';
$lang->risk->assignTo = '指派';
$lang->risk->deleted = '删除';
$lang->risk->legendBasicInfo = '基本信息';
$lang->risk->legendLifeTime = '风险的一生';
$lang->risk->confirmDelete = '您确认删除该风险吗?';
/* Fields */
$lang->risk->common = '风险';
@@ -27,6 +33,7 @@ $lang->risk->remedy = '应急措施';
$lang->risk->identifiedDate = '识别日期';
$lang->risk->plannedClosedDate = '计划关闭日期';
$lang->risk->assignedTo = '指派给';
$lang->risk->assignedDate = '指派日期';
$lang->risk->createdBy = '由谁创建';
$lang->risk->createdDate = '创建日期';
$lang->risk->noAssigned = '未指派';
@@ -44,6 +51,12 @@ $lang->risk->activateDate = '激活日期';
$lang->risk->isChange = '是否有变化';
$lang->risk->trackedBy = '由谁跟踪';
$lang->risk->trackedDate = '跟踪日期';
$lang->risk->editedBy = '由谁编辑';
$lang->risk->editedDate = '编辑日期';
$lang->risk->action = new stdclass();
$lang->risk->action->hangup = '$date, 由 <strong>$actor</strong> 挂起。' . "\n";
$lang->risk->action->tracked = '$date, 由 <strong>$actor</strong> 跟踪。' . "\n";
$lang->risk->sourceList[''] = '';
$lang->risk->sourceList['business'] = '业务部门';
@@ -92,3 +105,7 @@ $lang->risk->strategyList['acceptance'] = '接受';
$lang->risk->isChangeList[0] = '否';
$lang->risk->isChangeList[1] = '是';
$lang->risk->cancelReasonList[''] = '';
$lang->risk->cancelReasonList['disappeared'] = '风险自行消失';
$lang->risk->cancelReasonList['mistake'] = '识别错误';
+27
View File
@@ -206,4 +206,31 @@ class riskModel extends model
if(!dao::isError()) return common::createChanges($oldRisk, $risk);
return false;
}
public static function isClickable($risk, $action)
{
$action = strtolower($action);
if($action == 'cancel' or $action == 'close') return $risk->status != 'canceled' and $risk->status != 'closed';
if($action == 'hangup') return $risk->status == 'active';
if($action == 'activate') return $risk->status != 'active';
return true;
}
/**
* Build search form.
*
* @param int $queryID
* @param string $actionURL
* @access public
* @return void
*/
public function buildSearchForm($queryID, $actionURL)
{
$this->config->risk->search['actionURL'] = $actionURL;
$this->config->risk->search['queryID'] = $queryID;
$this->loadModel('search')->setSearchParams($this->config->bug->search);
}
}
+2 -1
View File
@@ -40,7 +40,7 @@
<?php foreach($risks as $risk):?>
<tr>
<td><?php echo $risk->id;?></td>
<td><?php echo $risk->name;?></td>
<td><?php echo html::a($this->createLink('risk', 'view', "riskID=$risk->id"), $risk->name);?></td>
<td><?php echo zget($lang->risk->strategyList, $risk->strategy);?></td>
<td><?php echo zget($lang->risk->statusList, $risk->status);?></td>
<td><?php echo $risk->identifiedDate == '0000-00-00' ? '' : $risk->identifiedDate;?></td>
@@ -64,6 +64,7 @@
</tbody>
</table>
<div class='table-footer'>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
</div>
+6 -1
View File
@@ -19,7 +19,12 @@
<th class='w-100px'><?php echo $lang->risk->cancelDate;?></th>
<td><?php echo html::input('cancelDate', helper::today(), "class='form-control form-date'");?></td>
<td></td>
</tr> <tr>
</tr>
<tr>
<th class='w-100px'><?php echo $lang->risk->cancelReason;?></th>
<td><?php echo html::select('cancelReason', $lang->risk->cancelReasonList, '', "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td> </tr>
<tr>
+3 -6
View File
@@ -70,15 +70,12 @@
<td colspan='2'><?php echo html::textarea('resolution', $risk->resolution, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->risk->prevention;?></th>
<td colspan='2'><?php echo html::textarea('prevention', $risk->prevention, "class='form-control'");?></td>
<th><?php echo $lang->risk->resolvedBy;?></th>
<td><?php echo html::select('resolvedBy', $users, empty($risk->resolvedBy) ? $this->app->user->account : $risk->resolvedBy, "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->risk->remedy;?></th>
<td colspan='2'><?php echo html::textarea('remedy', $risk->remedy, "class='form-control'");?></td>
</tr><tr>
<th><?php echo $lang->risk->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, $risk->assignedTo, "class='form-control chosen'");?></td>
<td><?php echo html::select('assignedTo', $users, empty($risk->assignedTo) ? $this->app->user->account : $risk->assignedTo, "class='form-control chosen'");?></td>
</tr>
<tr>
+206
View File
@@ -0,0 +1,206 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php $browseLink = $this->createLink('risk', 'browse');?>
<?php js::set('sysurl', common::getSysUrl());?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php if(!isonlybody()):?>
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary'");?>
<div class="divider"></div>
<?php endif;?>
<div class="page-title">
<span class="label label-id"><?php echo $risk->id?></span>
<span class="text" title='<?php echo $risk->name;?>'><?php echo $risk->name;?></span>
<?php if($risk->deleted):?>
<span class='label label-danger'><?php echo $lang->risk->deleted;?></span>
<?php endif; ?>
</div>
</div>
</div>
<div id="mainContent" class="main-row">
<div class="main-col col-8">
<div class="cell">
<div class="detail">
<div class="detail-title"><?php echo $lang->risk->prevention;?></div>
<div class="detail-content article-content"><?php echo $risk->prevention;?></div>
</div>
<div class="detail">
<div class="detail-title"><?php echo $lang->risk->remedy;?></div>
<div class="detail-content article-content"><?php echo $risk->remedy;?></div>
</div>
<div class="detail">
<div class="detail-title"><?php echo $lang->risk->resolution;?></div>
<div class="detail-content article-content"><?php echo $risk->resolution;?></div>
</div>
</div>
<div class="cell"><?php include '../../common/view/action.html.php';?></div>
<div class='main-actions'>
<div class="btn-toolbar">
<?php common::printBack($browseLink);?>
<?php if(!isonlybody()) echo "<div class='divider'></div>";?>
<?php if(!$risk->deleted):?>
<?php
common::printIcon('risk', 'track', "riskID=$risk->id", $risk, 'button', 'checked', '', 'showinonlybody');
common::printIcon('risk', 'assignTo', "riskID=$risk->id", $risk, 'button', '', '', 'iframe showinonlybody', true);
common::printIcon('risk', 'cancel', "riskID=$risk->id", $risk, 'button', '', '', 'iframe showinonlybody', true);
common::printIcon('risk', 'close', "riskID=$risk->id", $risk, 'button', '', '', 'iframe showinonlybody', true);
common::printIcon('risk', 'hangup', "riskID=$risk->id", $risk, 'button', 'arrow-up', '', 'iframe showinonlybody', true);
common::printIcon('risk', 'activate', "riskID=$risk->id", $risk, 'button', '', '', 'iframe showinonlybody', true);
echo "<div class='divider'></div>";
common::printIcon('risk', 'edit', "riskID=$risk->id", $risk);
common::printIcon('risk', 'delete', "riskID=$risk->id", $risk, 'button', 'trash', 'hiddenwin');
?>
<?php endif;?>
</div>
</div>
</div>
<div class="side-col col-4">
<div class="cell">
<div class='tabs'>
<ul class='nav nav-tabs'>
<li class='active'><a href='' data-toggle='tab'><?php echo $lang->risk->legendBasicInfo;?></a></li>
</ul>
<div class='tab-content'>
<div class='tab-pane active' id='basicInfo'>
<table class="table table-data">
<tbody>
<tr>
<th class='w-90px'><?php echo $lang->risk->id;?></th>
<td><?php echo $risk->id;?></td>
</tr>
<tr>
<th><?php echo $lang->risk->source;?></th>
<td><?php echo zget($lang->risk->sourceList, $risk->source);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->category;?></th>
<td><?php echo zget($lang->risk->categoryList, $risk->category);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->strategy;?></th>
<td><?php echo zget($lang->risk->strategy, $risk->strategy);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->status;?></th>
<td><span class='status-story status-<?php echo $risk->status?>'><span class="label label-dot"></span> <?php echo $this->processStatus('risk', $risk);?></span></td>
</tr>
<tr>
<th><?php echo $lang->risk->impact;?></th>
<td><?php echo zget($lang->risk->impact, $risk->impact);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->probability;?></th>
<td><?php echo zget($lang->risk->probability, $risk->probability);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->riskindex;?></th>
<td><?php echo $risk->riskindex;?></td>
</tr>
<tr>
<th><?php echo $lang->risk->pri;?></th>
<td><span class='label-pri <?php echo 'label-pri-' . $risk->pri;?>' title='<?php echo zget($lang->risk->priList, $risk->pri)?>'><?php echo zget($lang->risk->priList, $risk->pri)?></span></td>
</tr>
<tr>
<th><?php echo $lang->risk->identifiedDate;?></th>
<td><?php echo $risk->identifiedDate == '0000-00-00' ? '' : $risk->identifiedDate;?></td>
</tr>
<tr>
<th><?php echo $lang->risk->plannedClosedDate;?></th>
<td><?php echo $risk->plannedClosedDate == '0000-00-00' ? '' : $risk->plannedClosedDate;?></td>
</tr>
<tr>
<th><?php echo $lang->risk->actualClosedDate;?></th>
<td><?php echo $risk->actualClosedDate == '0000-00-00' ? '' : $risk->actualClosedDate;?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="cell">
<div class='tabs'>
<ul class='nav nav-tabs'>
<li class='active'><a href='' data-toggle='tab'><?php echo $lang->risk->legendLifeTime;?></a></li>
</ul>
<div class='tab-content'>
<div class='tab-pane active' id='legendLifeTime'>
<table class="table table-data">
<tbody>
<tr>
<th class='w-90px'><?php echo $lang->risk->assignedTo;?></th>
<td><?php echo zget($users, $risk->assignedTo);?></td>
</tr>
<tr>
<th class='w-90px'><?php echo $lang->risk->trackedBy;?></th>
<td><?php echo zget($users, $risk->trackedBy);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->trackedDate;?></th>
<td><?php echo $risk->trackedDate == '0000-00-00' ? '' : $risk->trackedDate;?></td>
</tr>
<tr>
<th class='w-90px'><?php echo $lang->risk->createdBy;?></th>
<td><?php echo zget($users, $risk->createdBy);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->createdDate;?></th>
<td><?php echo $risk->createdDate == '0000-00-00' ? '' : $risk->createdDate;?></td>
</tr>
<tr>
<th class='w-90px'><?php echo $lang->risk->editedBy;?></th>
<td><?php echo zget($users, $risk->editedBy);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->editedDate;?></th>
<td><?php echo $risk->editedDate == '0000-00-00' ? '' : $risk->editedDate;?></td>
</tr>
<tr>
<th><?php echo $lang->risk->assignedDate;?></th>
<td><?php echo $risk->assignedDate == '0000-00-00' ? '' : $risk->assignedDate;?></td>
</tr>
<tr>
<th class='w-90px'><?php echo $lang->risk->resolvedBy;?></th>
<td><?php echo zget($users, $risk->resolvedBy);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->actualClosedDate;?></th>
<td><?php echo $risk->actualClosedDate == '0000-00-00' ? '' : $risk->actualClosedDate;?></td>
</tr>
<tr>
<th class='w-90px'><?php echo $lang->risk->cancelBy;?></th>
<td><?php echo zget($users, $risk->cancelBy);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->cancelDate;?></th>
<td><?php echo $risk->cancelDate == '0000-00-00' ? '' : $risk->cancelDate;?></td>
</tr>
<tr>
<th><?php echo $lang->risk->cancelReason;?></th>
<td><?php echo zget($lang->risk->cancelReasonList, $risk->cancelReason);?></td>
</tr>
<tr>
<th class='w-90px'><?php echo $lang->risk->hangupBy;?></th>
<td><?php echo zget($users, $risk->hangupBy);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->hangupDate;?></th>
<td><?php echo $risk->hangupDate == '0000-00-00' ? '' : $risk->hangupDate;?></td>
</tr>
<tr>
<th class='w-90px'><?php echo $lang->risk->activateBy;?></th>
<td><?php echo zget($users, $risk->activateBy);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->activateDate;?></th>
<td><?php echo $risk->activateDate == '0000-00-00' ? '' : $risk->activateDate;?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+19
View File
@@ -586,6 +586,11 @@ class upgradeModel extends model
$this->saveLogs('Execute 12_2');
$this->execSQL($this->getUpgradeFile('12.2'));
$this->appendExec('12_2');
case '20_0':
$this->saveLogs('Execute 20_0');
$this->execSQL($this->getUpgradeFile('20.0'));
$this->setWork2Full();
$this->appendExec('20_0');
}
$this->deletePatch();
@@ -757,6 +762,7 @@ class upgradeModel extends model
$confirmContent .= file_get_contents($xuanxuanSql);
}
case '12_2': $confirmContent .= file_get_contents($this->getUpgradeFile('12.2'));
case '20_0': $confirmContent .= file_get_contents($this->getUpgradeFile('20.0'));
}
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
}
@@ -3766,6 +3772,7 @@ class upgradeModel extends model
$program->name = $data->name;
$program->code = $data->code;
$program->template = 'scrum';
$program->type = 'program';
$program->category = count($productIdList) > 1 ? 'multiple' : 'single';
$program->status = 'wait';
$program->begin = $data->begin;
@@ -3988,6 +3995,18 @@ class upgradeModel extends model
}
}
/**
* Set work to full.
*
* @access public
* @return bool
*/
public function setWork2Full()
{
$this->loadModel('setting')->setItem('system.common.global.flow', 'full');
return true;
}
/**
* Append execute for pro and biz.
*