Merge branch 'master' of git@github.com:easysoft/zentaopms
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<table class='table-1 colored tablesorter'>
|
||||
<caption class='caption-tr'>
|
||||
<?php if($type == 'hidden') echo html::a($this->inLink('trash', "type=all"), $lang->goback);?>
|
||||
<?php if($type == 'all') echo html::a($this->inLink('trash', "type=hidden"), $lang->action->dynamic->hidden);?>
|
||||
<?php if($type == 'hidden') echo html::a(inLink('trash', "type=all"), $lang->goback);?>
|
||||
<?php if($type == 'all') echo html::a(inLink('trash', "type=hidden"), $lang->action->dynamic->hidden);?>
|
||||
</caption>
|
||||
<?php $vars = "type=$type&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<thead>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<form method='post' target='hiddenwin' action='<?php echo $this->inLink('clearData', 'confirm=no')?>'>
|
||||
<form method='post' target='hiddenwin' action='<?php echo inLink('clearData', 'confirm=no')?>'>
|
||||
<table align='center' class='table-5'>
|
||||
<caption><?php echo $lang->admin->clearData;?></caption>
|
||||
<tr><td><?php echo nl2br($lang->admin->clearDataDesc);?></td></tr>
|
||||
|
||||
@@ -17,7 +17,8 @@ $(function()
|
||||
{
|
||||
$("#story").chosen({no_results_text:noResultsMatch});
|
||||
$("#task").chosen({no_results_text:noResultsMatch});
|
||||
$("#mailto").autocomplete(userList, { multiple: true, mustMatch: true});
|
||||
$("#mailto").chosen({no_results_text:noResultsMatch});
|
||||
$(".chzn-container-multi .chzn-choices li.search-field input").attr('value', mailto);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ $lang->bug->severityAB = 'S';
|
||||
$lang->bug->pri = 'Priority';
|
||||
$lang->bug->type = 'Type';
|
||||
$lang->bug->os = 'OS';
|
||||
$lang->bug->plan = 'Plan';
|
||||
$lang->bug->hardware = 'Hardware';
|
||||
$lang->bug->browser = 'Browser';
|
||||
$lang->bug->machine = 'Machine';
|
||||
@@ -353,10 +354,14 @@ $lang->bug->report->bugHistories->graph->xAxisName = 'Histories';
|
||||
|
||||
/* 操作记录。*/
|
||||
$lang->bug->action = new stdclass();
|
||||
$lang->bug->action->resolved = array('main' => '$date, Resolved by <strong>$actor</strong>, resolution is <strong>$extra</strong>.', 'extra' => $lang->bug->resolutionList);
|
||||
$lang->bug->action->tostory = array('main' => '$date, To story by <strong>$actor</strong>, ID is <strong>$extra</strong>.');
|
||||
$lang->bug->action->totask = array('main' => '$date, To task by <strong>$actor</strong>, ID is <strong>$extra</strong>.');
|
||||
$lang->bug->action->resolved = array('main' => '$date, Resolved by <strong>$actor</strong>, resolution is <strong>$extra</strong>.', 'extra' => $lang->bug->resolutionList);
|
||||
$lang->bug->action->tostory = array('main' => '$date, To story by <strong>$actor</strong>, ID is <strong>$extra</strong>.');
|
||||
$lang->bug->action->totask = array('main' => '$date, To task by <strong>$actor</strong>, ID is <strong>$extra</strong>.');
|
||||
$lang->bug->action->linked2plan = array('main' => '$date, 由 <strong>$actor</strong> 关联到计划 <strong>$extra</strong>。');
|
||||
$lang->bug->action->unlinkedfromplan = array('main' => '$date, 由 <strong>$actor</strong> 从计划 <strong>$extra</strong> 移除。');
|
||||
|
||||
$lang->bug->placeholder = new stdclass();
|
||||
$lang->bug->placeholder->mailto = 'you can input the user account to select users to mail to.';
|
||||
$lang->bug->placeholder->chooseBuilds = 'Choose builds...';
|
||||
|
||||
$lang->bug->chosen = new stdClass();
|
||||
$lang->bug->chosen->mailto = 'Select users to mail...';
|
||||
|
||||
@@ -25,6 +25,7 @@ $lang->bug->severityAB = '级别';
|
||||
$lang->bug->pri = '优先级';
|
||||
$lang->bug->type = 'Bug类型';
|
||||
$lang->bug->os = '操作系统';
|
||||
$lang->bug->plan = '所属计划';
|
||||
$lang->bug->hardware = '硬件平台';
|
||||
$lang->bug->browser = '浏览器';
|
||||
$lang->bug->machine = '机器硬件';
|
||||
@@ -353,10 +354,14 @@ $lang->bug->report->bugHistories->graph->xAxisName = '处理步骤';
|
||||
|
||||
/* 操作记录。*/
|
||||
$lang->bug->action = new stdclass();
|
||||
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong>。', 'extra' => $lang->bug->resolutionList);
|
||||
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong>需求</strong>,编号为 <strong>$extra</strong>。');
|
||||
$lang->bug->action->totask = array('main' => '$date, 由 <strong>$actor</strong> 导入为<strong>任务</strong>,编号为 <strong>$extra</strong>。');
|
||||
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong>。', 'extra' => $lang->bug->resolutionList);
|
||||
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong>需求</strong>,编号为 <strong>$extra</strong>。');
|
||||
$lang->bug->action->totask = array('main' => '$date, 由 <strong>$actor</strong> 导入为<strong>任务</strong>,编号为 <strong>$extra</strong>。');
|
||||
$lang->bug->action->linked2plan = array('main' => '$date, 由 <strong>$actor</strong> 关联到计划 <strong>$extra</strong>。');
|
||||
$lang->bug->action->unlinkedfromplan = array('main' => '$date, 由 <strong>$actor</strong> 从计划 <strong>$extra</strong> 移除。');
|
||||
|
||||
$lang->bug->placeholder = new stdclass();
|
||||
$lang->bug->placeholder->mailto = '输入用户名自动选择';
|
||||
$lang->bug->placeholder->chooseBuilds = '选择相关版本...';
|
||||
|
||||
$lang->bug->chosen = new stdClass();
|
||||
$lang->bug->chosen->mailto = '输入用户名自动选择...';
|
||||
|
||||
+35
-5
@@ -51,6 +51,7 @@ class bugModel extends model
|
||||
->specialChars('title,keyword')
|
||||
->cleanInt('product, module, severity')
|
||||
->join('openedBuild', ',')
|
||||
->join('mailto', ',')
|
||||
->remove('files, labels')
|
||||
->get();
|
||||
$this->dao->insert(TABLE_BUG)->data($bug)->autoCheck()->batchCheck($this->config->bug->create->requiredFields, 'notempty')->exec();
|
||||
@@ -122,6 +123,29 @@ class bugModel extends model
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bug list of a plan.
|
||||
*
|
||||
* @param int $planID
|
||||
* @param string $status
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getPlanBugs($planID, $status = 'all', $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('plan')->eq((int)$planID)
|
||||
->beginIF($status != 'all')->andWhere('status')->in($status)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll('id');
|
||||
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug');
|
||||
|
||||
return $bugs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get info of a bug.
|
||||
*
|
||||
@@ -208,6 +232,7 @@ class bugModel extends model
|
||||
->add('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->join('openedBuild', ',')
|
||||
->join('mailto', ',')
|
||||
->setIF($this->post->assignedTo != $oldBug->assignedTo, 'assignedDate', $now)
|
||||
->setIF($this->post->resolvedBy != '' and $this->post->resolvedDate == '', 'resolvedDate', $now)
|
||||
->setIF($this->post->resolution != '' and $this->post->resolvedDate == '', 'resolvedDate', $now)
|
||||
@@ -332,6 +357,7 @@ class bugModel extends model
|
||||
->setDefault('lastEditedDate', $now)
|
||||
->setDefault('assignedDate', $now)
|
||||
->remove('comment')
|
||||
->join('mailto', ',')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_BUG)
|
||||
@@ -358,6 +384,7 @@ class bugModel extends model
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedDate', $now)
|
||||
->remove('comment')
|
||||
->join('mailto', ',')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)->where('id')->eq($bugID)->exec();
|
||||
@@ -999,12 +1026,15 @@ class bugModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getAllBugs($productID, $projects, $orderBy, $pager)
|
||||
public function getAllBugs($productID, $projects, $orderBy, $pager = null)
|
||||
{
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where('product')->eq($productID)
|
||||
->andWhere('project')->in(array_keys($projects))
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
$bugs = $this->dao->select('t1.*, t2.title as planTitle')
|
||||
->from(TABLE_BUG)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id')
|
||||
->where('t1.product')->eq($productID)
|
||||
->andWhere('t1.project')->in(array_keys($projects))
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug');
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
<?php
|
||||
include '../../common/view/header.html.php';
|
||||
include '../../common/view/kindeditor.html.php';
|
||||
include '../../common/view/autocomplete.html.php';
|
||||
include '../../common/view/chosen.html.php';
|
||||
js::set('holders', $lang->bug->placeholder);
|
||||
js::set('userList', array_keys($users));
|
||||
js::set('page', 'assignedto');
|
||||
js::set('mailto', $lang->bug->chosen->mailto);
|
||||
?>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table-1'>
|
||||
@@ -27,7 +27,7 @@ js::set('page', 'assignedto');
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->mailto;?></td>
|
||||
<td><?php echo html::input('mailto', $bug->mailto, 'class="text-1"');?></td>
|
||||
<td><?php echo html::select('mailto[]', $users, str_replace(' ', '', $bug->mailto), 'class="text-1" multiple');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->comment;?></td>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<form method='post' target='hiddenwin' action="<?php echo $this->inLink('batchEdit', "productID=$productID");?>">
|
||||
<form method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "productID=$productID");?>">
|
||||
<table class='table-1 fixed'>
|
||||
<caption><?php echo $lang->bug->common . $lang->colon . $lang->bug->batchEdit;?></caption>
|
||||
<tr>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</td>
|
||||
<td class='divider'></td>
|
||||
<td>
|
||||
<form method='post' action='<?php echo $this->inLink('batchEdit', "productID=$productID");?>'>
|
||||
<form method='post' action='<?php echo inLink('batchEdit', "productID=$productID");?>'>
|
||||
<?php include './buglist.custom.html.php'?>
|
||||
</form>
|
||||
</td>
|
||||
|
||||
@@ -64,7 +64,7 @@ js::set('customed', $customed);
|
||||
}
|
||||
?>
|
||||
|
||||
<form method='post' action='<?php echo $this->inLink('batchEdit', "productID=$productID");?>'>
|
||||
<form method='post' action='<?php echo inLink('batchEdit', "productID=$productID");?>'>
|
||||
<table class='cont-lt1'>
|
||||
<tr valign='top'>
|
||||
<td class='side <?php echo $treeClass;?>' id='treebox'>
|
||||
|
||||
@@ -13,12 +13,11 @@
|
||||
<?php
|
||||
include '../../common/view/header.html.php';
|
||||
include '../../common/view/kindeditor.html.php';
|
||||
include '../../common/view/autocomplete.html.php';
|
||||
include '../../common/view/chosen.html.php';
|
||||
js::set('holders', $lang->bug->placeholder);
|
||||
js::set('userList', array_keys($users));
|
||||
js::set('page', 'confirmbug');
|
||||
js::set('mailto', $lang->bug->chosen->mailto);
|
||||
?>
|
||||
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $bug->title;?></caption>
|
||||
@@ -28,7 +27,7 @@ js::set('page', 'confirmbug');
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->mailto;?></td>
|
||||
<td><?php echo html::input('mailto', $bug->mailto, 'class="text-1"');?></td>
|
||||
<td><?php echo html::select('mailto[]', $users, str_replace(' ' , '', $bug->mailto), 'class="text-1" multiple');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->comment;?></td>
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
<?php
|
||||
include '../../common/view/header.html.php';
|
||||
include '../../common/view/form.html.php';
|
||||
include '../../common/view/autocomplete.html.php';
|
||||
include '../../common/view/chosen.html.php';
|
||||
include '../../common/view/alert.html.php';
|
||||
include '../../common/view/kindeditor.html.php';
|
||||
js::set('holders', $lang->bug->placeholder);
|
||||
js::set('userList', array_keys($users));
|
||||
js::set('page', 'create');
|
||||
js::set('mailto', $lang->bug->chosen->mailto);
|
||||
?>
|
||||
|
||||
<form method='post' enctype='multipart/form-data' id='dataform' class='ajaxForm'>
|
||||
@@ -85,8 +85,8 @@ js::set('page', 'create');
|
||||
<th class='rowhead'><nobr><?php echo $lang->bug->lblMailto;?></nobr></th>
|
||||
<td>
|
||||
<?php
|
||||
echo html::input('mailto', $mailto, 'class=text-1');
|
||||
if($contactLists) echo html::select('', $contactLists, '', "onchange=\"setMailto('mailto', this.value)\"");
|
||||
echo html::select('mailto[]', $users, str_replace(' ', '', $mailto), 'class=text-1 multiple');
|
||||
if($contactLists) echo html::select('', $contactLists, '', "class='f-right' onchange=\"setMailto('mailto', this.value)\"");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php
|
||||
include '../../common/view/header.html.php';
|
||||
include '../../common/view/chosen.html.php';
|
||||
include '../../common/view/autocomplete.html.php';
|
||||
include '../../common/view/chosen.html.php';
|
||||
include '../../common/view/alert.html.php';
|
||||
include '../../common/view/kindeditor.html.php';
|
||||
js::set('page' , 'edit');
|
||||
@@ -25,7 +25,7 @@ js::set('oldStoryID' , $bug->story);
|
||||
js::set('oldTaskID' , $bug->task);
|
||||
js::set('oldOpenedBuild' , $bug->openedBuild);
|
||||
js::set('oldResolvedBuild' , $bug->resolvedBuild);
|
||||
js::set('userList' , array_keys($users));
|
||||
js::set('mailto' , $lang->bug->chosen->mailto);
|
||||
?>
|
||||
|
||||
<form method='post' target='hiddenwin' enctype='multipart/form-data' id='dataform'>
|
||||
@@ -119,6 +119,10 @@ js::set('userList' , array_keys($users));
|
||||
<td class='rowhead'><?php echo $lang->bug->keywords;?></td>
|
||||
<td><?php echo html::input('keywords', $bug->keywords, 'class="text-3"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead w-p20'><?php echo $lang->bug->mailto;?></td>
|
||||
<td><?php echo html::select('mailto[]', $users, str_replace(' ', '', $bug->mailto), 'class="text-3" multiple');?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
@@ -185,10 +189,6 @@ js::set('userList' , array_keys($users));
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendMisc;?></legend>
|
||||
<table class='table-1 a-left'>
|
||||
<tr>
|
||||
<td class='rowhead w-p20'><?php echo $lang->bug->mailto;?></td>
|
||||
<td><?php echo html::input('mailto', $bug->mailto, 'class="text-3"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->linkBug;?></td>
|
||||
<td><?php echo html::input('linkBug', $bug->linkBug, 'class="text-3"');?></td>
|
||||
|
||||
+42
-2
@@ -122,7 +122,11 @@ class buildModel extends model
|
||||
->remove('allchecker')
|
||||
->add('project', (int)$projectID)->get();
|
||||
$this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->create->requiredFields, 'notempty')->check('name', 'unique', "product = {$build->product}")->exec();
|
||||
if(!dao::isError()) return $this->dao->lastInsertID();
|
||||
if(!dao::isError())
|
||||
{
|
||||
$this->updateLinkedBug($build);
|
||||
return $this->dao->lastInsertID();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,6 +153,42 @@ class buildModel extends model
|
||||
->where('id')->eq((int)$buildID)
|
||||
->check('name','unique', "id != $buildID AND product = {$build->product}")
|
||||
->exec();
|
||||
if(!dao::isError()) return common::createChanges($oldBuild, $build);
|
||||
if(!dao::isError())
|
||||
{
|
||||
$this->updateLinkedBug($build);
|
||||
return common::createChanges($oldBuild, $build);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update linked bug to resolved.
|
||||
*
|
||||
* @param object $build
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updateLinkedBug($build)
|
||||
{
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($build->bugs)->fetchAll();
|
||||
$now = helper::now();
|
||||
|
||||
$this->loadModel('action');
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
if($bug->status == 'resolved') continue;
|
||||
|
||||
$bug->resolvedBy = $this->app->user->account;
|
||||
$bug->resolvedDate = $now;
|
||||
$bug->status = 'resolved';
|
||||
$bug->confirmed = 1;
|
||||
$bug->assignedDate = $now;
|
||||
$bug->assignedTo = $bug->openedBy;
|
||||
$bug->lastEditedBy = $this->app->user->account;
|
||||
$bug->lastEditedDate = $now;
|
||||
$bug->resolution = 'fixed';
|
||||
$bug->resolvedBuild = $build->name;
|
||||
$this->dao->update(TABLE_BUG)->data($bug)->where('id')->eq($bug->id)->exec();
|
||||
$this->action->create('bug', $bug->id, 'Resolved', '', 'fixed');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ class common extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function printRPN($backLink, $preAndNext = '')
|
||||
static public function printRPN($backLink, $preAndNext = '')
|
||||
{
|
||||
global $lang, $app;
|
||||
if(isonlybody()) return false;
|
||||
@@ -355,7 +355,7 @@ class common extends control
|
||||
$title = isset($preAndNext->pre->title) ? $preAndNext->pre->title : $preAndNext->pre->name;
|
||||
$title = '#' . $preAndNext->pre->$id . ' ' . $title;
|
||||
echo "<span class='link-button'>";
|
||||
echo html::a($this->inLink('view', "ID={$preAndNext->pre->$id}"), ' ', '', "id='pre' class='icon-pre' title='{$title}'");
|
||||
echo html::a(inLink('view', "ID={$preAndNext->pre->$id}"), ' ', '', "id='pre' class='icon-pre' title='{$title}'");
|
||||
echo "</span>";
|
||||
}
|
||||
if(isset($preAndNext->next) and $preAndNext->next)
|
||||
@@ -364,7 +364,7 @@ class common extends control
|
||||
$title = isset($preAndNext->next->title) ? $preAndNext->next->title : $preAndNext->next->name;
|
||||
$title = '#' . $preAndNext->next->$id . ' ' . $title;
|
||||
echo "<span class='link-button'>";
|
||||
echo html::a($this->inLink('view', "ID={$preAndNext->next->$id}"), ' ', '', "id='next' class='icon-next' title='$title'");
|
||||
echo html::a(inLink('view', "ID={$preAndNext->next->$id}"), ' ', '', "id='next' class='icon-next' title='$title'");
|
||||
echo "</span>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,10 +298,11 @@ class deptModel extends model
|
||||
* Delete a department.
|
||||
*
|
||||
* @param int $deptID
|
||||
* @param null $null compatible with that of model::delete()
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($deptID)
|
||||
public function delete($deptID, $null = null)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_DEPT)->where('id')->eq($deptID)->exec();
|
||||
}
|
||||
|
||||
@@ -182,10 +182,11 @@ class groupModel extends model
|
||||
* Delete a group.
|
||||
*
|
||||
* @param int $groupID
|
||||
* @param null $null compatible with that of model::delete()
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($groupID)
|
||||
public function delete($groupID, $null = null)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_GROUP)->where('id')->eq($groupID)->exec();
|
||||
$this->dao->delete()->from(TABLE_USERGROUP)->where('`group`')->eq($groupID)->exec();
|
||||
|
||||
@@ -28,7 +28,7 @@ if(isset($error))
|
||||
<?php
|
||||
echo html::select('to', $users, $app->user->account);
|
||||
echo html::submitButton($lang->mail->test);
|
||||
echo html::linkButton($lang->mail->edit, $this->inLink('edit'));
|
||||
echo html::linkButton($lang->mail->edit, inLink('edit'));
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -87,5 +87,5 @@ $lang->product->aclList['open'] = 'Default(Having product module prividge, ca
|
||||
$lang->product->aclList['private'] = 'Private(Only project team members can visit)';
|
||||
$lang->product->aclList['custom'] = 'Whitelist(Project team members and who belongs to the whilelist groups can visit)';
|
||||
|
||||
$lang->product->storySummary = "Total <strong>%s</strong> stories in this page, estimate <strong>%s</strong> hours.";
|
||||
$lang->product->storySummary = "Total <strong>%s</strong> stories in this page, estimate <strong>%s</strong> hours, case coverage is %s ";
|
||||
$lang->product->noMatched = 'No matched product including "%s"';
|
||||
|
||||
@@ -87,5 +87,5 @@ $lang->product->aclList['open'] = '默认设置(有产品视图权限,即
|
||||
$lang->product->aclList['private'] = '私有产品(只有项目团队成员才能访问)';
|
||||
$lang->product->aclList['custom'] = '自定义白名单(团队成员和白名单的成员可以访问)';
|
||||
|
||||
$lang->product->storySummary = "本页共 <strong>%s</strong> 个需求,预计 <strong>%s</strong> 个工时。";
|
||||
$lang->product->storySummary = "本页共 <strong>%s</strong> 个需求,预计 <strong>%s</strong> 个工时,用例覆盖率<strong>%s</strong>。";
|
||||
$lang->product->noMatched = '找不到包含"%s"的产品';
|
||||
|
||||
@@ -593,8 +593,17 @@ class productModel extends model
|
||||
public function summary($stories)
|
||||
{
|
||||
$totalEstimate = 0.0;
|
||||
foreach($stories as $key => $story) $totalEstimate += $story->estimate;
|
||||
return sprintf($this->lang->product->storySummary, count($stories), $totalEstimate);
|
||||
$storyIDs = array();
|
||||
|
||||
foreach($stories as $key => $story)
|
||||
{
|
||||
$totalEstimate += $story->estimate;
|
||||
$storyIDs[] = $story->id;
|
||||
}
|
||||
|
||||
$cases = $this->dao->select('DISTINCT story')->from(TABLE_CASE)->where('story')->in($storyIDs)->fetchAll();
|
||||
|
||||
return sprintf($this->lang->product->storySummary, count($stories), $totalEstimate, round(count($cases) / count($stories), 2) * 100 . "%");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<form method='post' target='hiddenwin' action='<?php echo $this->inLink('batchEdit');?>'>
|
||||
<form method='post' target='hiddenwin' action='<?php echo inLink('batchEdit');?>'>
|
||||
<table class='table-1 colored fixed'>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'> <?php echo $lang->idAB;?></th>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<form method='post' action='<?php echo $this->inLink('batchEdit', "productID=$productID");?>'>
|
||||
<form method='post' action='<?php echo inLink('batchEdit', "productID=$productID");?>'>
|
||||
<table class='table-1 colored fixed'>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'> <?php echo $lang->idAB;?></th>
|
||||
|
||||
@@ -145,6 +145,7 @@ class productplan extends control
|
||||
$this->view->position[] = $this->lang->productplan->view;
|
||||
$this->view->planStories= $this->loadModel('story')->getPlanStories($planID);
|
||||
$this->view->products = $products;
|
||||
$this->view->summary = $this->product->summary($this->view->planStories);
|
||||
$this->view->plan = $plan;
|
||||
$this->view->actions = $this->loadModel('action')->getList('productplan', $planID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
@@ -241,4 +242,99 @@ class productplan extends control
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Link bugs.
|
||||
*
|
||||
* @param int $planID
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkBug($planID = 0, $browseType = '', $param = 0)
|
||||
{
|
||||
$this->session->set('bugList', $this->app->getURI(true));
|
||||
|
||||
if(!empty($_POST['bugs'])) $this->productplan->linkBug($planID);
|
||||
|
||||
$this->loadModel('bug');
|
||||
$plan = $this->productplan->getByID($planID);
|
||||
$this->commonAction($plan->product);
|
||||
$products = $this->product->getPairs();
|
||||
$productID = $plan->product;
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
|
||||
/* Build the search form. */
|
||||
$this->config->bug->search['actionURL'] = $this->createLink('bug', 'browse', "productID={$plan->product}&browseType=bySearch&queryID=myQueryID");
|
||||
$this->config->bug->search['queryID'] = $queryID;
|
||||
$this->config->bug->search['params']['product']['values'] = array($productID => $products[$productID], 'all' => $this->lang->bug->allProduct);
|
||||
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0);
|
||||
$this->config->bug->search['params']['project']['values'] = $this->product->getProjectPairs($productID);
|
||||
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID);
|
||||
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->build->getProductBuildPairs($productID);
|
||||
$this->loadModel('search')->setSearchParams($this->config->bug->search);
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$allBugs = $this->bug->getBySearch($plan->product, $queryID, 'id');
|
||||
foreach($allBugs as $key => $bug)
|
||||
{
|
||||
if($bug->status != 'active') unset($allBugs[$key]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$projects = $this->loadModel('project')->getPairs();
|
||||
$projects[0] = '';
|
||||
$allBugs= $this->loadModel('bug')->getAllBugs($this->view->product->id, $projects, 'id_desc');
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->productplan->linkBug;
|
||||
$this->view->position[] = $this->lang->productplan->linkBug;
|
||||
$this->view->allBugs = $allBugs;
|
||||
$this->view->planBugs = $this->bug->getPlanBugs($planID);
|
||||
$this->view->products = $products;
|
||||
$this->view->plan = $plan;
|
||||
$this->view->plans = $this->dao->select('id, end')->from(TABLE_PRODUCTPLAN)->fetchPairs();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink story
|
||||
*
|
||||
* @param int $bugID
|
||||
* @param string $confirm yes|no
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkBug($bugID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->productplan->confirmUnlinkBug, $this->createLink('productplan', 'unlinkbug', "bugID=$bugID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->productplan->unlinkBug($bugID);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch unlink story.
|
||||
*
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchUnlinkBug($confirm = 'no')
|
||||
{
|
||||
foreach($this->post->unlinkBugs as $bugID)
|
||||
{
|
||||
$this->productplan->unlinkBug($bugID);
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,15 @@ $lang->productplan->batchUnlinkStory = "Batch Remove";
|
||||
$lang->productplan->linkedStories = 'Stories linked';
|
||||
$lang->productplan->unlinkedStories = 'Stories unlinked';
|
||||
|
||||
$lang->productplan->linkBug = "Link bug";
|
||||
$lang->productplan->unlinkBug = "Remove bug";
|
||||
$lang->productplan->batchUnlinkBug = "Batch Remove";
|
||||
$lang->productplan->linkedBugs = 'Bugs linked';
|
||||
$lang->productplan->unlinkedBugs = 'Bugs unlinked';
|
||||
|
||||
$lang->productplan->confirmDelete = "Are you sure to delete this plan?";
|
||||
$lang->productplan->confirmUnlinkStory = "Are you sure to remove this story?";
|
||||
$lang->productplan->confirmUnlinkBug = "Are you sure to remove this bug?";
|
||||
|
||||
$lang->productplan->basicInfo ='Basic Info';
|
||||
|
||||
|
||||
@@ -22,8 +22,15 @@ $lang->productplan->batchUnlinkStory = "批量移除";
|
||||
$lang->productplan->linkedStories = '已关联需求列表';
|
||||
$lang->productplan->unlinkedStories = '未关联需求列表';
|
||||
|
||||
$lang->productplan->linkBug = "关联Bug";
|
||||
$lang->productplan->unlinkBug = "移除Bug";
|
||||
$lang->productplan->batchUnlinkBug = "批量移除";
|
||||
$lang->productplan->linkedBugs = '已关联Bug列表';
|
||||
$lang->productplan->unlinkedBugs = '未关联Bug列表';
|
||||
|
||||
$lang->productplan->confirmDelete = "您确认删除该计划吗?";
|
||||
$lang->productplan->confirmUnlinkStory = "您确认移除该需求吗?";
|
||||
$lang->productplan->confirmUnlinkBug = "您确认移除该Bug吗?";
|
||||
|
||||
$lang->productplan->basicInfo ='基本信息';
|
||||
|
||||
|
||||
@@ -152,4 +152,36 @@ class productplanModel extends model
|
||||
$this->loadModel('story')->setStage($storyID);
|
||||
$this->loadModel('action')->create('story', $storyID, 'unlinkedfromplan', '', $planID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Link bugs.
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkBug($planID)
|
||||
{
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('action');
|
||||
foreach($this->post->bugs as $bugID)
|
||||
{
|
||||
$this->dao->update(TABLE_BUG)->set('plan')->eq((int)$planID)->where('id')->eq((int)$bugID)->exec();
|
||||
$this->action->create('bug', $bugID, 'linked2plan', '', $planID);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink bug.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkBug($bugID)
|
||||
{
|
||||
$planID = $this->dao->findByID($bugID)->from(TABLE_BUG)->fields('plan')->fetch('plan');
|
||||
$this->dao->update(TABLE_BUG)->set('plan')->eq(0)->where('id')->eq((int)$bugID)->exec();
|
||||
$this->loadModel('action')->create('bug', $bugID, 'unlinkedfromplan', '', $planID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<td><?php echo $plan->end;?></td>
|
||||
<td class='a-center'>
|
||||
<?php
|
||||
common::printIcon('productplan', 'linkBug', "planID=$plan->id", '', 'list');
|
||||
common::printIcon('productplan', 'linkStory', "planID=$plan->id", '', 'list');
|
||||
common::printIcon('productplan', 'edit', "planID=$plan->id", '', 'list');
|
||||
common::printIcon('productplan', 'delete', "planID=$plan->id", '', 'list', '', 'hiddenwin');
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/**
|
||||
* The link bug view of productplan module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
|
||||
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package productplan
|
||||
* @version $Id: linkbug.html.php 5096 2013-07-11 07:02:43Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<div id='querybox'></div>
|
||||
<form method='post' id='unlinkedBugsForm'>
|
||||
<table class='table-1 tablesorter a-center fixed'>
|
||||
<caption class='caption-tl'><?php echo $plan->title .$lang->colon . $lang->productplan->unlinkedBugs;?></caption>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'> <?php echo $lang->idAB;?></th>
|
||||
<th class='w-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th class='w-200px'> <?php echo $lang->bug->plan;?></th>
|
||||
<th> <?php echo $lang->bug->title;?></th>
|
||||
<th class='w-user'> <?php echo $lang->openedByAB;?></th>
|
||||
<th class='w-user'> <?php echo $lang->assignedToAB;?></th>
|
||||
<th class='w-status'><?php echo $lang->statusAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($allBugs as $bug):?>
|
||||
<?php
|
||||
if(isset($planBugs[$bug->id])) continue;
|
||||
if($bug->plan and helper::diffDate($plans[$bug->plan], helper::today()) > 0) continue;
|
||||
?>
|
||||
<tr>
|
||||
<td class='a-left'>
|
||||
<input class='ml-10px' type='checkbox' name='bugs[]' value='<?php echo $bug->id;?>'/>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->id);?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . $bug->pri;?>'><?php echo $bug->pri?></span></td>
|
||||
<td><?php echo $bug->planTitle;?></td>
|
||||
<td class='a-left nobr'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
<td><?php echo $users[$bug->assignedTo];?></td>
|
||||
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='7' class='a-left'>
|
||||
<?php if(count($allBugs)) echo html::selectAll('unlinkedBugsForm') . html::selectReverse('unlinkedBugsForm') . html::submitButton($lang->productplan->linkBug);?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<form method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkBug');?>" id='linkedBugsForm'>
|
||||
<table class='table-1 tablesorter a-center fixed'>
|
||||
<caption class='caption-tl'><?php echo $plan->title .$lang->colon . $lang->productplan->linkedBugs;?></caption>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'> <?php echo $lang->idAB;?></th>
|
||||
<th class='w-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th> <?php echo $lang->bug->title;?></th>
|
||||
<th class='w-user'> <?php echo $lang->openedByAB;?></th>
|
||||
<th class='w-user'> <?php echo $lang->assignedToAB;?></th>
|
||||
<th class='w-status'><?php echo $lang->statusAB;?></th>
|
||||
<th class='w-50px {sorter:false}'><?php echo $lang->actions?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $canBatchUnlink = common::hasPriv('productPlan', 'batchUnlinkBug');?>
|
||||
<?php foreach($planBugs as $bug):?>
|
||||
<tr>
|
||||
<td class='a-center'>
|
||||
<?php if($canBatchUnlink):?>
|
||||
<input class='ml-10px' type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
|
||||
<?php endif;?>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), sprintf("%03d", $bug->id));?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . $bug->pri;?>'><?php echo $bug->pri?></span></td>
|
||||
<td class='a-left nobr'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
<td><?php echo $users[$bug->assignedTo];?></td>
|
||||
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
|
||||
<td><?php common::printIcon('productplan', 'unlinkBug', "bug=$bug->id", '', 'list', '', 'hiddenwin');?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php if(count($planBugs) and $canBatchUnlink):?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='7' class='a-left'>
|
||||
<?php
|
||||
echo html::selectAll('linkedBugsForm') . html::selectReverse('linkedBugsForm');
|
||||
echo html::submitButton($lang->productplan->batchUnlinkBug);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<script>$(function(){ajaxGetSearchForm()})</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -61,7 +61,7 @@
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<form method='post' target='hiddenwin' action="<?php echo $this->inLink('batchUnlinkStory');?>" id='linkedStoriesForm'>
|
||||
<form method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkStory');?>" id='linkedStoriesForm'>
|
||||
<table class='table-1 tablesorter a-center fixed'>
|
||||
<caption class='caption-tl'><?php echo $plan->title .$lang->colon . $lang->productplan->linkedStories;?></caption>
|
||||
<thead>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<div id='titlebar' <?php if($plan->deleted) echo "class='deleted'";?>>PLAN #<?php echo $plan->id . ' ' . $plan->title;?></div>
|
||||
<form method='post' target='hiddenwin' action="<?php echo $this->inLink('batchUnlinkStory');?>">
|
||||
<form method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkStory');?>">
|
||||
<table class='cont-rt5'>
|
||||
<tr valign='top'>
|
||||
<td>
|
||||
@@ -27,6 +27,7 @@
|
||||
$browseLink = $this->session->productPlanList ? $this->session->productPlanList : inlink('browse', "planID=$plan->id");
|
||||
if(!$plan->deleted)
|
||||
{
|
||||
common::printIcon('productplan', 'linkBug', "planID=$plan->id");
|
||||
common::printIcon('productplan', 'linkStory',"planID=$plan->id");
|
||||
common::printIcon('productplan', 'edit', "planID=$plan->id");
|
||||
common::printIcon('productplan', 'delete', "planID=$plan->id", '', 'button', '', 'hiddenwin');
|
||||
@@ -103,7 +104,7 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='9'>
|
||||
<div class='a-left'>
|
||||
<div class='f-left'>
|
||||
<?php
|
||||
if(count($planStories) and $canBatchUnlink)
|
||||
{
|
||||
@@ -112,7 +113,7 @@
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class='a-right'><?php printf($lang->product->storySummary, count($planStories), $totalEstimate);?> </div>
|
||||
<div class='f-right'><?php echo $summary;?> </div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
@@ -537,6 +537,7 @@ class project extends control
|
||||
$this->view->position = $position;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->summary = $this->product->summary($stories);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->storyTasks = $storyTasks;
|
||||
$this->view->tabID = 'story';
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
.icon-green-task-create {padding:2px 7px 2px 10px; background:url(theme/default/images/main/zt-icons.png) -120px -200px;}
|
||||
.icon-green-task-batchCreate {padding:2px 10px 2px 10px; background:url(theme/default/images/main/zt-icons.png) -199px -200px;}
|
||||
|
||||
.icon-green-testcase-batchCreate {padding:2px 7px 2px 10px; background:url(theme/default/images/main/zt-icons.png) -80px -322px;}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<form method='post' action='<?php echo $this->inLink('batchEdit');?>'>
|
||||
<form method='post' action='<?php echo inLink('batchEdit');?>'>
|
||||
<table class='table-1 fixed colored'>
|
||||
<tr class='colhead'>
|
||||
<th class='w-30px'> <?php echo $lang->idAB;?></th>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<?php echo html::a(inlink("index", "locate=no&status=suspended&projectID=$project->id"), $lang->project->statusList['suspended']);?>
|
||||
<?php echo html::a(inlink("index", "locate=no&status=done&projectID=$project->id"), $lang->project->statusList['done']);?>
|
||||
</h3>
|
||||
<form method='post' action='<?php echo $this->inLink('batchEdit', "projectID=$projectID");?>'>
|
||||
<form method='post' action='<?php echo inLink('batchEdit', "projectID=$projectID");?>'>
|
||||
<table class='table-1 fixed colored'>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'> <?php echo $lang->idAB;?></th>
|
||||
|
||||
@@ -39,13 +39,13 @@
|
||||
<th class='w-hour {sorter:false}'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='w-status {sorter:false}'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
|
||||
<th class='w-50px'> <?php echo $lang->story->taskCount;?></th>
|
||||
<th class='w-80px {sorter:false}'> <?php echo $lang->actions;?></th>
|
||||
<th class='w-100px {sorter:false}'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$totalEstimate = 0;
|
||||
$canBatchEdit = common::hasPriv('story', 'batchEdit');
|
||||
$canBatchEdit = common::hasPriv('story', 'batchEdit');
|
||||
$canBatchClose = common::hasPriv('story', 'batchClose');
|
||||
?>
|
||||
<?php foreach($stories as $key => $story):?>
|
||||
@@ -83,6 +83,9 @@
|
||||
$lang->task->batchCreate = $lang->project->batchWBS;
|
||||
common::printIcon('task', 'batchCreate', "projectID={$project->id}&story={$story->id}", '', 'list');
|
||||
|
||||
$lang->testcase->batchCreate = $lang->testcase->create;
|
||||
if($productID) common::printIcon('testcase', 'batchCreate', "productID=$story->product&moduleID=0&storyID=$story->id", '', 'list');
|
||||
|
||||
$lang->project->unlinkStory = $lang->unlink;
|
||||
common::printIcon('project', 'unlinkStory', $param, '', 'list', '', 'hiddenwin');
|
||||
?>
|
||||
@@ -110,7 +113,7 @@
|
||||
echo html::commonButton($lang->close, "onclick=\"changeAction('projectStoryForm', 'batchClose', '$actionLink')\"");
|
||||
}
|
||||
}
|
||||
printf($lang->product->storySummary, count($stories), $totalEstimate);
|
||||
echo $summary;
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -265,4 +265,7 @@ $lang->story->report->storysPerChange->graph->xAxisName = 'Change';
|
||||
|
||||
$lang->story->placeholder = new stdclass();
|
||||
$lang->story->placeholder->estimate = 'Estimate the story point.';
|
||||
$lang->story->placeholder->mailto = 'Mail to';
|
||||
|
||||
$lang->story->chosen = new stdClass();
|
||||
$lang->story->chosen->reviewedBy = 'Choose users who review...';
|
||||
$lang->story->chosen->mailto = 'Choose users to mail...';
|
||||
|
||||
@@ -265,4 +265,7 @@ $lang->story->report->storysPerChange->graph->xAxisName = '变更次数';
|
||||
|
||||
$lang->story->placeholder = new stdclass();
|
||||
$lang->story->placeholder->estimate = "完成该需求的工作量";
|
||||
$lang->story->placeholder->mailto = '输入用户名自动完成';
|
||||
|
||||
$lang->story->chosen = new stdClass();
|
||||
$lang->story->chosen->reviewedBy = '选择评审人...';
|
||||
$lang->story->chosen->mailto = '输入用户名自动完成...';
|
||||
|
||||
@@ -119,6 +119,7 @@ class storyModel extends model
|
||||
->setIF($projectID > 0, 'stage', 'projected')
|
||||
->setIF($bugID > 0, 'fromBug', $bugID)
|
||||
->remove('files,labels,spec,verify,needNotReview,newStory')
|
||||
->join('mailto', ',')
|
||||
->get();
|
||||
|
||||
$this->dao->insert(TABLE_STORY)->data($story)->autoCheck()->batchCheck($this->config->story->create->requiredFields, 'notempty')->exec();
|
||||
@@ -333,6 +334,8 @@ class storyModel extends model
|
||||
->setIF($this->post->closedBy != false or $this->post->closedReason != false, 'status', 'closed')
|
||||
->setIF($this->post->closedReason != false and $this->post->closedBy == false, 'closedBy', $this->app->user->account)
|
||||
->remove('files,labels,comment')
|
||||
->join('reviewedBy', ',')
|
||||
->join('mailto', ',')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_STORY)
|
||||
@@ -459,7 +462,9 @@ class storyModel extends model
|
||||
->removeIF($this->post->result != 'reject', 'closedReason, duplicateStory, childStories')
|
||||
->removeIF($this->post->result == 'reject' and $this->post->closedReason != 'duplicate', 'duplicateStory')
|
||||
->removeIF($this->post->result == 'reject' and $this->post->closedReason != 'subdivided', 'childStories')
|
||||
->join('reviewedBy', ',')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_STORY)->data($story)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->story->review->requiredFields, 'notempty')
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<form method='post' target='hiddenwin' action="<?php echo $this->inLink('batchClose', "from=storyBatchClose")?>">
|
||||
<form method='post' target='hiddenwin' action="<?php echo inLink('batchClose', "from=storyBatchClose")?>">
|
||||
<table class='table-1 fixed colored'>
|
||||
<caption><?php echo $lang->story->common . $lang->colon . $lang->story->batchClose;?></caption>
|
||||
<tr>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<form method='post' target='hiddenwin' action="<?php echo $this->inLink('batchEdit', "from=storyBatchEdit")?>">
|
||||
<form method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "from=storyBatchEdit")?>">
|
||||
<table class='table-1 fixed'>
|
||||
<caption><?php echo $lang->story->common . $lang->colon . $lang->story->batchEdit;?></caption>
|
||||
<tr>
|
||||
|
||||
@@ -60,8 +60,8 @@
|
||||
<th class='rowhead'><nobr><?php echo $lang->story->mailto;?></nobr></th>
|
||||
<td>
|
||||
<?php
|
||||
echo html::input('mailto', $mailto, 'class="text-1"');
|
||||
if($contactLists) echo html::select('', $contactLists, '', "onchange=\"setMailto('mailto', this.value)\"");
|
||||
echo html::select('mailto[]', $users, str_replace(' ' , '', $mailto), 'class="text-1" multiple');
|
||||
if($contactLists) echo html::select('', $contactLists, '', "class='f-right' onchange=\"setMailto('mailto', this.value)\"");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -84,6 +84,10 @@
|
||||
<td class='rowhead'><?php echo $lang->story->keywords;?></td>
|
||||
<td><?php echo html::input('keywords', $story->keywords, 'class=text-1');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->story->mailto;?></td>
|
||||
<td><?php echo html::select('mailto[]', $users, str_replace(' ' , '', $story->mailto), "class='select-1' multiple");?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@@ -100,7 +104,7 @@
|
||||
<?php if($story->reviewedBy):?>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->story->reviewedBy;?></td>
|
||||
<td><?php echo html::textarea('reviewedBy', $story->reviewedBy, 'class="area-1"');?></td>
|
||||
<td><?php echo html::select('reviewedBy[]', $users, str_replace(' ', '', $story->reviewedBy), 'class="area-1" multiple');?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($story->status == 'closed'):?>
|
||||
@@ -131,11 +135,7 @@
|
||||
<td class='rowhead'><?php echo $lang->story->childStories;?></td>
|
||||
<td><?php echo html::input('childStories', $story->childStories, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->story->mailto;?></td>
|
||||
<td><?php echo html::textarea('mailto', $story->mailto, "class='area-1'");?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/autocomplete.html.php';?>
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php if(isset($users)) js::set('userList', array_keys($users)); ?>
|
||||
<?php js::set('reviewedBy', $lang->story->chosen->reviewedBy);?>
|
||||
<?php js::set('mailto', $lang->story->chosen->mailto);?>
|
||||
<script language='Javascript'>
|
||||
function loadProduct(productID)
|
||||
{
|
||||
@@ -10,8 +11,12 @@ function loadProduct(productID)
|
||||
$('#moduleIdBox').load(moduleLink);
|
||||
$('#planIdBox').load(planLink);
|
||||
}
|
||||
$(function() {
|
||||
$("#reviewedBy").autocomplete(userList,{multiple: true,mustMatch: true});
|
||||
$("#mailto").autocomplete(userList, { multiple: true, mustMatch: true});
|
||||
|
||||
$(function()
|
||||
{
|
||||
$("#reviewedBy").chosen({no_results_text:noResultsMatch});
|
||||
$("#mailto").chosen({no_results_text:noResultsMatch});
|
||||
$("#reviewedBy_chzn .chzn-choices li.search-field input").attr('value', reviewedBy);
|
||||
$("#mailto_chzn .chzn-choices li.search-field input").attr('value', mailto);
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -49,7 +49,7 @@ var assignedTo = '<?php $story->lastEditedBy ? print($story->lastEditedBy) : pri
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->story->reviewedBy;?></th>
|
||||
<td><?php echo html::input('reviewedBy', $app->user->account . ', ', 'class=text-1');?></td>
|
||||
<td><?php echo html::select('reviewedBy[]', $users, $app->user->account, "class='text-1' multiple");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->story->comment;?></th>
|
||||
|
||||
@@ -86,5 +86,6 @@ $(document).ready(function()
|
||||
{
|
||||
setPreview();
|
||||
$("#story").chosen({no_results_text: noResultsMatch});
|
||||
$("#mailto").autocomplete(userList, { multiple: true, mustMatch: true});
|
||||
$("#mailto").chosen({no_results_text: noResultsMatch});
|
||||
$("#mailto_chzn .chzn-choices li.search-field input").attr('value', mailto);
|
||||
});
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
$(function()
|
||||
{
|
||||
$("#story").chosen({no_results_text: noResultsMatch});
|
||||
$("#mailto").autocomplete(userList, { multiple: true, mustMatch: true});
|
||||
$("#mailto").chosen({no_results_text: noResultsMatch});
|
||||
$("#mailto_chzn .chzn-choices li.search-field input").attr('value', mailto);
|
||||
$('.iframe').colorbox({width:900, height:500, iframe:true, transition:'none', onCleanup:function(){parent.location.href=parent.location.href;}});
|
||||
})
|
||||
|
||||
|
||||
@@ -233,4 +233,6 @@ $lang->task->report->finishedTasksPerDay->graph->rotateNames = '1';
|
||||
|
||||
$lang->task->placeholder = new stdclass();
|
||||
$lang->task->placeholder->estimate = 'The estimated time for this task';
|
||||
$lang->task->placeholder->mailto = 'Mail to';
|
||||
|
||||
$lang->task->chosen = new stdclass();
|
||||
$lang->task->chosen->mailto = 'Choose users to mail...';
|
||||
|
||||
@@ -233,4 +233,6 @@ $lang->task->report->finishedTasksPerDay->graph->rotateNames = '1';
|
||||
|
||||
$lang->task->placeholder = new stdclass();
|
||||
$lang->task->placeholder->estimate = '对该任务最初的预计';
|
||||
$lang->task->placeholder->mailto = '输入用户名进行选择';
|
||||
|
||||
$lang->task->chosen = new stdclass();
|
||||
$lang->task->chosen->mailto = '输入用户名进行选择...';
|
||||
|
||||
@@ -41,6 +41,7 @@ class taskModel extends model
|
||||
->setDefault('openedBy', $this->app->user->account)
|
||||
->setDefault('openedDate', helper::now())
|
||||
->remove('after,files,labels')
|
||||
->join('mailto', ',')
|
||||
->get();
|
||||
|
||||
if($assignedTo) $task->assignedDate = helper::now();
|
||||
@@ -171,6 +172,7 @@ class taskModel extends model
|
||||
->add('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->remove('comment,files,labels')
|
||||
->join('mailto', ',')
|
||||
->get();
|
||||
$task->statusCustom = strpos(self::CUSTOM_STATUS_ORDER, $task->status) + 1;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<form method='post' target='hiddenwin' action="<?php echo $this->inLink('batchEdit', "projectID={$projectID}")?>">
|
||||
<form method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "projectID={$projectID}")?>">
|
||||
<table class='table-1 fixed'>
|
||||
<caption><?php echo $lang->task->common . $lang->colon . $lang->task->batchEdit;?></caption>
|
||||
<tr>
|
||||
|
||||
@@ -13,11 +13,10 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/form.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php include '../../common/view/autocomplete.html.php';?>
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('holders', $lang->task->placeholder);?>
|
||||
<?php js::set('userList', array_keys($users));?>
|
||||
<?php js::set('holders', $lang->task->placeholder);?>
|
||||
<?php js::set('mailto', $lang->task->chosen->mailto);?>
|
||||
<form method='post' enctype='multipart/form-data' id='dataform' class='ajaxForm'>
|
||||
<table align='center' class='table-1 a-left'>
|
||||
<caption>
|
||||
@@ -84,8 +83,8 @@
|
||||
<th class='rowhead'><?php echo $lang->task->mailto;?></th>
|
||||
<td>
|
||||
<?php
|
||||
echo html::input('mailto', $task->mailto, 'class="text-1"');
|
||||
if($contactLists) echo html::select('', $contactLists, '', "onchange=\"setMailto('mailto', this.value)\"");
|
||||
echo html::select('mailto[]', $users, str_replace(' ', '', $task->mailto), 'class="text-1" multiple');
|
||||
if($contactLists) echo html::select('', $contactLists, '', "class='f-right' onchange=\"setMailto('mailto', this.value)\"");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -13,12 +13,11 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<?php include '../../common/view/autocomplete.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('userList', array_keys($users)); ?>
|
||||
<?php js::set('oldStoryID', $task->story); ?>
|
||||
<?php js::set('confirmChangeProject', $lang->task->confirmChangeProject); ?>
|
||||
<?php js::set('changeProjectConfirmed', false); ?>
|
||||
<?php js::set('mailto', $lang->task->chosen->mailto);?>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
|
||||
<div id='titlebar'>
|
||||
<div id='main'>TASK #<?php echo $task->id . $lang->colon . html::input('name', $task->name, 'class="text-1"');?></div>
|
||||
@@ -82,7 +81,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->task->mailto;?></td>
|
||||
<td><?php echo html::input('mailto', $task->mailto, 'class="text-1"');?></td>
|
||||
<td><?php echo html::select('mailto[]', $users, str_replace(' ' , '', $task->mailto), 'class="text-1" multiple');?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
@@ -277,16 +277,16 @@ class testcase extends control
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $moduleID
|
||||
* @param int $testcaseID
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchCreate($productID, $moduleID = 0)
|
||||
public function batchCreate($productID, $moduleID = 0, $storyID = 0)
|
||||
{
|
||||
$this->loadModel('story');
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$caseID = $this->testcase->batchCreate($productID);
|
||||
$caseID = $this->testcase->batchCreate($productID, $storyID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate($this->createLink('testcase', 'browse', "productID=$productID&browseType=byModule¶m=$moduleID"), 'parent'));
|
||||
}
|
||||
@@ -310,10 +310,10 @@ class testcase extends control
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->story = $storyID ? $this->story->getByID($storyID) : '';
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0);
|
||||
$this->view->currentModuleID = $currentModuleID;
|
||||
$this->view->stories = $this->story->getProductStoryPairs($productID);
|
||||
$this->view->type = $type;
|
||||
$this->view->title = $title;
|
||||
|
||||
|
||||
@@ -73,12 +73,14 @@ class testcaseModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a batch case.
|
||||
* Batch create cases.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function batchCreate($productID)
|
||||
function batchCreate($productID, $storyID)
|
||||
{
|
||||
$now = helper::now();
|
||||
$cases = fixer::input('post')->get();
|
||||
@@ -90,7 +92,7 @@ class testcaseModel extends model
|
||||
$data[$i]->product = $productID;
|
||||
$data[$i]->module = $cases->module[$i] == 'same' ? ($i == 0 ? 0 : $data[$i-1]->module) : $cases->module[$i];
|
||||
$data[$i]->type = $cases->type[$i] == 'same' ? ($i == 0 ? '' : $data[$i-1]->type) : $cases->type[$i];
|
||||
$data[$i]->story = $cases->story[$i] == 'same' ? ($i == 0 ? 0 : $data[$i-1]->story) : $cases->story[$i];
|
||||
$data[$i]->story = $storyID ? $storyID : ($cases->story[$i] == 'same' ? ($i == 0 ? 0 : $data[$i-1]->story) : $cases->story[$i]);
|
||||
$data[$i]->title = htmlspecialchars($cases->title[$i]);
|
||||
$data[$i]->openedBy = $this->app->user->account;
|
||||
$data[$i]->openedDate = $now;
|
||||
|
||||
@@ -16,28 +16,27 @@
|
||||
<?php js::set('productID', $productID);?>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<table align='center' class='table-1 fixed'>
|
||||
<caption><?php echo $lang->testcase->batchCreate;?></caption>
|
||||
<caption><?php echo $lang->testcase->batchCreate; if($story) echo "{$lang->colon}STORY#{$story->id} $story->title";?></caption>
|
||||
<tr>
|
||||
<th class='w-20px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-300px'><?php echo $lang->testcase->module;?></th>
|
||||
<th class='w-180px'><?php echo $lang->testcase->type;?></th>
|
||||
<th><?php echo $lang->testcase->story;?></th>
|
||||
<th class='w-300px red'><?php echo $lang->testcase->title;?></th>
|
||||
<?php if(!$story) echo "<th>{$lang->testcase->story}</th>";?>
|
||||
<th class='red'><?php echo $lang->testcase->title;?></th>
|
||||
</tr>
|
||||
<?php for($i = 0; $i < $config->testcase->batchCreate; $i++):?>
|
||||
<?php $moduleOptionMenu['same'] = $lang->testcase->same; if($i != 0) $currentModuleID = 'same';?>
|
||||
<?php $lang->testcase->typeList['same'] = $lang->testcase->same; $type = ($i == 0 ? 'feature' : 'same');?>
|
||||
<?php $stories['same'] = $lang->testcase->same; $story = $i == 0 ? '' : 'same';?>
|
||||
<?php $pri = 3;?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td><?php echo html::select("module[$i]", $moduleOptionMenu, $currentModuleID, "class=select-1");?></td>
|
||||
<td><?php echo html::select("type[$i]", $lang->testcase->typeList, $type, "class=select-1");?></td>
|
||||
<td class='a-left'style='overflow:visible'><?php echo html::select("story[$i]", '', $story, 'class="select-1 storySelect"');?></td>
|
||||
<?php if(!$story):?><td class='a-left'style='overflow:visible'><?php echo html::select("story[$i]", '', '', 'class="select-1 storySelect"');?></td><?php endif;?>
|
||||
<td><?php echo html::input("title[$i]", '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
<tr><td colspan='5' class='a-center'><?php echo html::submitButton() . html::backButton();?></td></tr>
|
||||
<tr><td colspan='<?php $story ? print '4' : print '5'?>' class='a-center'><?php echo html::submitButton() . html::backButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<form method='post' target='hiddenwin' action="<?php echo $this->inLink('batchEdit');?>">
|
||||
<form method='post' target='hiddenwin' action="<?php echo inLink('batchEdit');?>">
|
||||
<table class='table-1 fixed'>
|
||||
<caption><?php echo $lang->testcase->common . $lang->colon . $lang->testcase->batchEdit;?></caption>
|
||||
<tr>
|
||||
|
||||
@@ -58,5 +58,11 @@
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php $case = $run->case; include './results.html.php'; ?>
|
||||
<?php
|
||||
ob_start();
|
||||
$case = $run->case; include './results.html.php';
|
||||
$results = ob_get_contents();
|
||||
ob_clean();
|
||||
echo preg_replace("/<h1>[\s\S]*<\/h1>|<fieldset>[\s\S]*<\/fieldset>/", "", $results);
|
||||
?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -928,10 +928,11 @@ class treeModel extends model
|
||||
* Delete a module.
|
||||
*
|
||||
* @param int $moduleID
|
||||
* @param null $null compatible with that of model::delete()
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($moduleID)
|
||||
public function delete($moduleID, $null = null)
|
||||
{
|
||||
$module = $this->getById($moduleID);
|
||||
$childs = $this->getAllChildId($moduleID);
|
||||
|
||||
+12
-5
@@ -901,12 +901,19 @@ class user extends control
|
||||
*/
|
||||
public function ajaxGetContactUsers($contactListID)
|
||||
{
|
||||
$list = $this->user->getContactListByID($contactListID);
|
||||
if($list)
|
||||
if(!$contactListID)
|
||||
{
|
||||
$users = str_replace(',', ', ', $list->userList) . ', ';
|
||||
echo $users;
|
||||
$users = $this->user->getPairs('nodeleted,devfirst');
|
||||
echo html::select('mailto[]', $users, '', "class='text-1' multiple");
|
||||
}
|
||||
else
|
||||
{
|
||||
$list = $this->user->getContactListByID($contactListID);
|
||||
if($list)
|
||||
{
|
||||
$users = explode(',', $list->userList);
|
||||
echo html::select('mailto[]', $users, '', "class='text-1' multiple");
|
||||
}
|
||||
}
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -483,11 +483,12 @@ function setExport()
|
||||
*/
|
||||
function setMailto(mailto, contactListID)
|
||||
{
|
||||
if(!contactListID) return;
|
||||
link = createLink('user', 'ajaxGetContactUsers', 'listID=' + contactListID);
|
||||
$.get(link, function(users)
|
||||
{
|
||||
$('#' + mailto).val(users);
|
||||
$('#' + mailto).replaceWith(users);
|
||||
$('#' + mailto + '_chzn').remove();
|
||||
$('#' + mailto).chosen({no_results_text: noResultsMatch});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -485,9 +485,11 @@ table.tablesorter thead tr .headerSortDown {background-image: url(./images/table
|
||||
.icon-gray-story-createCase {padding:2px 8px; background:url(images/main/zt-icons.png) -120px -221px;}
|
||||
|
||||
.icon-green-project-unlinkStory {padding:2px 5px 2px 10px; background:url(images/main/zt-icons.png) -60px 0px;}
|
||||
.icon-green-productplan-unlinkStory {padding:2px 5px 2px 10px; background:url(images/main/zt-icons.png) -60px 0px;}
|
||||
.icon-green-productplan-unlinkStory, .icon-green-productplan-unlinkBug{padding:2px 5px 2px 10px; background:url(images/main/zt-icons.png) -60px 0px;}
|
||||
|
||||
.icon-green-project-linkStory, .icon-green-productplan-linkStory {padding:2px 3px 2px 10px; background:url(images/main/zt-icons.png) -161px -201px;}
|
||||
.icon-green-productplan-linkBug {padding:2px 8px; background:url(images/main/zt-icons.png) 0px -282px;}
|
||||
|
||||
#featurebar .f-right .icon-green-story-create, .icon-green-story-create {padding:2px 7px 2px 10px; background:url(images/main/zt-icons.png) 0px -202px;}
|
||||
#featurebar .f-right .icon-green-story-batchCreate {padding:2px 7px 2px 10px; background:url(images/main/zt-icons.png) -20px -202px;}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user