Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -58,7 +58,18 @@ class control extends baseControl
|
||||
|
||||
$viewFile = file_exists($commonExtViewFile) ? $commonExtViewFile : $mainViewFile;
|
||||
$viewFile = (!empty($siteExtViewFile) and file_exists($siteExtViewFile)) ? $siteExtViewFile : $viewFile;
|
||||
if(!is_file($viewFile)) $this->app->triggerError("the view file $viewFile not found", __FILE__, __LINE__, $exit = true);
|
||||
if(!is_file($viewFile))
|
||||
{
|
||||
if($this->config->debug === false)
|
||||
{
|
||||
die(js::locate($this->createLink('misc','ajaxerror', ".mhtml"), 'parent'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->app->triggerError("the view file $viewFile not found", __FILE__, __LINE__, $exit = true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$commonExtHookFiles = glob($viewExtPath['common'] . $this->devicePrefix . $methodName . ".*.{$viewType}.hook.php");
|
||||
$siteExtHookFiles = empty($viewExtPath['site']) ? '' : glob($viewExtPath['site'] . $this->devicePrefix . $methodName . ".*.{$viewType}.hook.php");
|
||||
|
||||
@@ -1622,7 +1622,7 @@ class bug extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$browseType = $this->lang->bug->moreSelects[$browseType];
|
||||
$browseType = isset($this->lang->bug->moreSelects[$browseType]) ? $this->lang->bug->moreSelects[$browseType] : null;
|
||||
}
|
||||
|
||||
$this->view->fileName = $productName . $this->lang->dash . $browseType . $fileName;
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php $spliter = (empty($this->app->user->feedback) && !$this->cookie->feedbackView) ? true : false;?>
|
||||
<div class="main-row <?php if($spliter) echo 'split-row';?>" id="mainRow">
|
||||
<?php if($spliter):?>
|
||||
<?php include './side.html.php';?>
|
||||
<?php endif;?>
|
||||
<?php if($this->cookie->browseType == 'bylist'):?>
|
||||
<?php include dirname(__FILE__) . '/alllibsbylist.html.php';?>
|
||||
<?php else:?>
|
||||
|
||||
@@ -21,9 +21,7 @@ var browseType = '<?php echo $browseType;?>';
|
||||
|
||||
<?php $spliter = (empty($this->app->user->feedback) && !$this->cookie->feedbackView && $this->from == 'doc') ? true : false;?>
|
||||
<div class="main-row fade <?php if($spliter) echo 'split-row';?>" id="mainRow">
|
||||
<?php if($spliter):?>
|
||||
<?php include './side.html.php';?>
|
||||
<?php endif;?>
|
||||
<?php if($this->cookie->browseType == 'bygrid'):?>
|
||||
<?php include dirname(__FILE__) . '/browsebygrid.html.php';?>
|
||||
<?php else:?>
|
||||
|
||||
@@ -193,4 +193,8 @@ class misc extends control
|
||||
$this->view->detailed = $detailed;
|
||||
$this->display();
|
||||
}
|
||||
public function ajaxerror()
|
||||
{
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,3 +173,5 @@ $lang->misc->feature->all['7.1.stable'][] = array('title'=>'提供rpm和deb包',
|
||||
|
||||
$lang->misc->feature->all['6.3.stable'][] = array('title'=>'增加数据表格功能', 'desc' => '<p>可配置数据表格中可显示的字段,按照配置字段显示想看的数据</p>');
|
||||
$lang->misc->feature->all['6.3.stable'][] = array('title'=>'继续完善细节', 'desc' => '');
|
||||
|
||||
$lang->misc->error = '此功能正在努力开发中...';
|
||||
|
||||
@@ -1279,6 +1279,7 @@ class taskModel extends model
|
||||
->remove('finishedDate,comment,assignedTo,files,labels,consumed')
|
||||
->get();
|
||||
$estimate->consumed = $consumed;
|
||||
$estimate->date = $this->post->finishedDate;/*#task 7849*/
|
||||
if($estimate->consumed) $this->addTaskEstimate($estimate);
|
||||
|
||||
if(!empty($oldTask->team))
|
||||
@@ -2445,7 +2446,6 @@ class taskModel extends model
|
||||
$action = strtolower($action);
|
||||
|
||||
if($action == 'start' and !empty($task->children)) return false;
|
||||
if($action == 'recordestimate' and !empty($task->children)) return false;
|
||||
if($action == 'finish' and !empty($task->children)) return false;
|
||||
if($action == 'cancel' and !empty($task->children)) return false;
|
||||
if($action == 'pause' and !empty($task->children)) return false;
|
||||
@@ -2454,6 +2454,7 @@ class taskModel extends model
|
||||
if($action == 'close' and !empty($task->children)) return false;
|
||||
if($action == 'batchcreate' and !empty($task->team)) return false;
|
||||
if($action == 'batchcreate' and $task->parent > 0) return false;
|
||||
if($action == 'recordestimate' and $task->parent == -1) return false;
|
||||
|
||||
if($action == 'start') return $task->status == 'wait';
|
||||
if($action == 'restart') return $task->status == 'pause';
|
||||
|
||||
@@ -64,7 +64,7 @@ class todo extends control
|
||||
|
||||
if($this->app->getViewType() == 'xhtml') die(js::locate($this->createLink('todo', 'view', "todoID=$todoID"), 'parent'));
|
||||
if(isonlybody()) die(js::locate($this->createLink('my', 'todo', "type=$date"), 'parent.parent'));
|
||||
die(js::locate($this->createLink('my', 'todo', "type=$date"), 'parent'));
|
||||
die(js::locate($this->createLink('my', 'todo', "type=all"), 'parent'));
|
||||
}
|
||||
|
||||
unset($this->lang->todo->typeList['cycle']);
|
||||
|
||||
+15
-6
@@ -35,7 +35,7 @@ class todoModel extends model
|
||||
->setIF($this->post->begin == false, 'begin', '2400')
|
||||
->setIF($this->post->end == false, 'end', '2400')
|
||||
->stripTags($this->config->todo->editor->create['id'], $this->config->allowedTags)
|
||||
->remove('bug, task, story, uid')
|
||||
->remove('bug, task, story, uid, feedback')
|
||||
->get();
|
||||
if(empty($todo->cycle)) unset($todo->config);
|
||||
if(!empty($todo->cycle))
|
||||
@@ -77,11 +77,6 @@ class todoModel extends model
|
||||
$this->file->updateObjectID($this->post->uid, $todoID, 'todo');
|
||||
$this->loadModel('score')->create('todo', 'create', $todoID);
|
||||
if(!empty($todo->cycle)) $this->createByCycle(array($todoID => $todo));
|
||||
if(isset($todo->type) and $todo->type == 'feedback')
|
||||
{
|
||||
$this->dao->update(TABLE_FEEDBACK)->set('`status`')->eq('closed')->where('id')->eq($todo->idvalue)->exec();
|
||||
$this->loadModel('action')->create('feedback', $todo->idvalue, 'totodo', '', $todoID);
|
||||
}
|
||||
return $todoID;
|
||||
}
|
||||
}
|
||||
@@ -423,6 +418,20 @@ class todoModel extends model
|
||||
return $todos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get by id list.
|
||||
*
|
||||
* @param array $todoIDList
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByList($todoIDList = 0)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_TODO)
|
||||
->beginIF($todoIDList)->where('id')->in($todoIDList)->fi()
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Judge an action is clickable or not.
|
||||
*
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', '', "rows='8' class='form-control'");?></td>
|
||||
<td colspan='2'><?php echo html::textarea('desc', isset($feedback->desc) ? $feedback->desc : '', "rows='8' class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->status;?></th>
|
||||
|
||||
@@ -1433,7 +1433,7 @@ class userModel extends model
|
||||
public function checkProductPriv($product, $account, $groups, $linkedProjects, $teams)
|
||||
{
|
||||
if(strpos($this->app->company->admins, ',' . $account . ',') !== false) return true;
|
||||
if($product->PO == $account OR $product->QD == $account OR $product->RD == $account OR $product->createdBy == $account) return true;
|
||||
if($product->PO == $account OR $product->QD == $account OR $product->RD == $account OR $product->createdBy == $account OR $product->feedback == $account) return true;
|
||||
if($product->acl == 'open') return true;
|
||||
|
||||
if($product->acl == 'custom')
|
||||
|
||||
Reference in New Issue
Block a user