Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -20,6 +20,11 @@ helper::import(dirname(dirname(__FILE__)) . '/base/dao/dao.class.php');
|
||||
*/
|
||||
class dao extends baseDAO
|
||||
{
|
||||
public function exec($sql = '')
|
||||
{
|
||||
if(isset($_SESSION['tutorialMode']) and $_SESSION['tutorialMode']) die(js::alert($this->lang->error->tutorialData));
|
||||
return parent::exec($sql);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@ $themeRoot = $webRoot . "theme/";
|
||||
if(isset($pageCSS)) css::internal($pageCSS);
|
||||
$useGuest = $this->app->user->account == 'guest';
|
||||
?>
|
||||
<div class='dashboard<?php if(!$useGuest) echo ' dashboard-draggable'?>' id='dashboard' data-confirm-remove-block='<?php echo $lang->block->confirmRemoveBlock;?>'>
|
||||
<div class='dashboard' id='dashboard' data-confirm-remove-block='<?php echo $lang->block->confirmRemoveBlock;?>'>
|
||||
<div class='dashboard-actions'><a href='<?php echo $this->createLink("block", "admin", "id=0&module=$module"); ?>' data-toggle='modal' data-type='ajax' data-width='700' data-title='<?php echo $lang->block->createBlock?>'><i class='icon icon-plus' title='<?php echo $lang->block->createBlock?>' data-toggle='tooltip' data-placement='left'></i></a></div>
|
||||
<div class='dashboard-empty-message hide'>
|
||||
<a href='<?php echo $this->createLink("block", "admin", "id=0&module=$module"); ?>' data-toggle='modal' data-type='ajax' data-width='700' class='btn btn-primary'><i class='icon icon-plus'></i> <?php echo $lang->block->createBlock?></a>
|
||||
@@ -57,7 +57,7 @@ $useGuest = $this->app->user->account == 'guest';
|
||||
config.ordersSaved = '<?php echo $lang->block->ordersSaved; ?>';
|
||||
config.confirmRemoveBlock = '<?php echo $lang->block->confirmRemoveBlock; ?>';
|
||||
var module = '<?php echo $module?>';
|
||||
var useGuest = <?php echo $useGuest?>;
|
||||
var useGuest = <?php echo $useGuest ? 'true' : 'false';?>;
|
||||
</script>
|
||||
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
|
||||
<?php if(isset($pageJS)) js::execute($pageJS);?>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<th width='45'><?php echo $lang->project->totalEstimate;?></th>
|
||||
<th width='45'><?php echo $lang->project->totalConsumed;?></th>
|
||||
<th width='45'><?php echo $lang->project->totalLeft;?></th>
|
||||
<th width='100'><?php echo $lang->project->progess;?></th>
|
||||
<th width='115'><?php echo $lang->project->progess;?></th>
|
||||
<th width='100'><?php echo $lang->project->burn;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -46,7 +46,7 @@
|
||||
<td><?php echo $project->hours->totalConsumed;?></td>
|
||||
<td><?php echo $project->hours->totalLeft;?></td>
|
||||
<td class='text-left'>
|
||||
<img class='progressbar' src='<?php echo $this->app->getWebRoot();?>theme/default/images/main/green.png' alt='' height='16' width='<?php echo $project->hours->progress == 0 ? 1 : round($project->hours->progress);?>'>
|
||||
<img class='progressbar' src='<?php echo $this->app->getWebRoot();?>theme/default/images/main/green.png' alt='' height='16' width='<?php echo $project->hours->progress == 0 ? 1 : round($project->hours->progress * 0.7);?>'>
|
||||
<small><?php echo $project->hours->progress;?>%</small>
|
||||
</td>
|
||||
<td id='spark-<?php echo $id++?>' class='spark text-left pd-0' values='<?php echo join(',', $project->burns);?>'></td>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if($bugs):?>
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
|
||||
@@ -96,3 +97,4 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -9,7 +9,7 @@ function showLink(buildID, type, param)
|
||||
|
||||
var formID = type == 'story' ? '#unlinkedStoriesForm' : '#unlinkedBugsForm';
|
||||
setTimeout(function(){fixedTfootAction(formID)}, 100);
|
||||
autoCheck();
|
||||
checkTable($(formID).find('table'));
|
||||
});
|
||||
}
|
||||
$(function()
|
||||
|
||||
@@ -385,6 +385,7 @@ $lang->error->accessDenied = 'No purview';
|
||||
$lang->error->pasteImg = 'Your browser does not support the paste image!';
|
||||
$lang->error->noData = 'No data';
|
||||
$lang->error->editedByOther = 'The record may have been changed. Please refresh and re edit!';
|
||||
$lang->error->tutorialData = 'Novice mode will not insert data, please exit it to operation';
|
||||
|
||||
/* Pager. */
|
||||
$lang->pager = new stdclass();
|
||||
|
||||
@@ -385,6 +385,7 @@ $lang->error->accessDenied = '您没有访问权限';
|
||||
$lang->error->pasteImg = '您的浏览器不支持粘贴图片!';
|
||||
$lang->error->noData = '没有数据';
|
||||
$lang->error->editedByOther = '该记录可能已经被改动。请刷新页面重新编辑!';
|
||||
$lang->error->tutorialData = '新手模式下不会插入数据,请退出新手模式操作';
|
||||
|
||||
/* 分页信息。*/
|
||||
$lang->pager = new stdclass();
|
||||
|
||||
@@ -170,6 +170,7 @@ class commonModel extends model
|
||||
if($module == 'sso' and $method == 'gettodolist') return true;
|
||||
if($module == 'product' and $method == 'showerrornone') return true;
|
||||
if($module == 'block' and $method == 'printblock') return true;
|
||||
if($module == 'block' and $method == 'main') return true;
|
||||
|
||||
if($this->loadModel('user')->isLogon())
|
||||
{
|
||||
|
||||
@@ -96,6 +96,11 @@ class productModel extends model
|
||||
if($productID == 0 and $this->cookie->lastProduct) $this->session->set('product', (int)$this->cookie->lastProduct);
|
||||
if($productID == 0 and $this->session->product == '') $this->session->set('product', key($products));
|
||||
if(!isset($products[$this->session->product])) $this->session->set('product', key($products));
|
||||
if($this->cookie->preProductID != $productID)
|
||||
{
|
||||
$this->cookie->set('preBranch', 0);
|
||||
setcookie('preBranch', 0, $this->config->cookieLife, $this->config->webRoot);
|
||||
}
|
||||
|
||||
return $this->session->product;
|
||||
}
|
||||
@@ -778,7 +783,7 @@ class productModel extends model
|
||||
public function getProductLink($module, $method, $extra, $branch = false)
|
||||
{
|
||||
$link = '';
|
||||
if(strpos('product,roadmap,bug,testcase,testtask,story', $module) !== false)
|
||||
if(strpos('product,roadmap,bug,testcase,testtask,story,qa', $module) !== false)
|
||||
{
|
||||
if($module == 'product' && $method == 'project')
|
||||
{
|
||||
@@ -788,13 +793,13 @@ class productModel extends model
|
||||
{
|
||||
$link = helper::createLink($module, $method, "productID=%s");
|
||||
}
|
||||
elseif($module == 'product' && $method == 'index')
|
||||
elseif($module == 'qa' && $method == 'index')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "locate=no&productID=%s");
|
||||
$link = helper::createLink('bug', 'browse', "productID=%s" . ($branch ? "&branch=%s" : ''));
|
||||
}
|
||||
elseif($module == 'product' && $method == 'browse')
|
||||
elseif($module == 'product' && ($method == 'browse' or $method == 'index' or $method == 'all'))
|
||||
{
|
||||
$link = helper::createLink($module, $method, "productID=%s" . ($branch ? "&branch=%s" : ''));
|
||||
$link = helper::createLink($module, 'browse', "productID=%s" . ($branch ? "&branch=%s" : ''));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<?php echo html::a($this->createLink('product', 'index', "locate=no&productID=$productID"), "<i class='icon-cubes mgr-5px'></i> " . $lang->product->allProduct)?>
|
||||
<?php echo html::a($this->createLink('product', 'all', "productID=$productID"), "<i class='icon-cubes mgr-5px'></i> " . $lang->product->allProduct)?>
|
||||
<?php if($closeds):?>
|
||||
<div class='pull-right actions'><a id='more' href='javascript:switchMore()'><?php echo $lang->product->closed;?> <i class='icon-angle-right'></i></a></div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if($stories):?>
|
||||
<tbody>
|
||||
<?php foreach($stories as $key => $story):?>
|
||||
<?php
|
||||
@@ -76,3 +77,4 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -9,7 +9,7 @@ function showLink(planID, type, orderBy, param)
|
||||
|
||||
var formID = type == 'story' ? '#unlinkedStoriesForm' : '#unlinkedBugsForm';
|
||||
setTimeout(function(){fixedTfootAction(formID)}, 100);
|
||||
autoCheck();
|
||||
checkTable($(formID).find('table'));
|
||||
});
|
||||
}
|
||||
$(function()
|
||||
|
||||
@@ -53,7 +53,8 @@ class project extends control
|
||||
if($locate == 'yes') $this->locate($this->createLink('project', 'task'));
|
||||
|
||||
unset($this->lang->project->menu->index);
|
||||
$this->project->setMenu($this->projects, key($this->projects));
|
||||
$this->commonAction($projectID);
|
||||
//$this->project->setMenu($this->projects, key($this->projects));
|
||||
|
||||
$this->view->title = $this->lang->project->index;
|
||||
$this->view->position[] = $this->lang->project->index;
|
||||
|
||||
@@ -1693,9 +1693,9 @@ class projectModel extends model
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s&type=$extra");
|
||||
}
|
||||
elseif($module == 'project' && $method == 'index')
|
||||
elseif($module == 'project' && ($method == 'index' or $method == 'all'))
|
||||
{
|
||||
$link = helper::createLink($module, $method, "locate=no&status=undone&projectID=%s");
|
||||
$link = helper::createLink($module, 'task', "projectID=%s");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<?php echo html::a($this->createLink('project', 'index', "locate=no&status=undone&projectID=$projectID"), "<i class='icon-th-large mgr-5px'></i> " . $lang->project->allProject)?>
|
||||
<?php echo html::a($this->createLink('project', 'all', "status=undone&projectID=$projectID"), "<i class='icon-th-large mgr-5px'></i> " . $lang->project->allProject)?>
|
||||
<?php if($dones):?>
|
||||
<div class='pull-right actions'><a id='more' href='javascript:switchMore()'><?php echo $lang->project->doneProjects . ' <i class="icon-angle-right"></i>';?></a></div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<th class='w-150px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if($tasks):?>
|
||||
<tbody>
|
||||
<?php foreach($tasks as $task):?>
|
||||
<?php $class = $task->assignedTo == $app->user->account ? 'style=color:red' : ''; ?>
|
||||
@@ -106,3 +107,4 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<?php endif?>
|
||||
|
||||
@@ -11,7 +11,7 @@ function showLink(releaseID, type, param)
|
||||
|
||||
var formID = type == 'story' ? '#unlinkedStoriesForm' : (type == 'leftBug' ? '#unlinkedLeftBugsForm' : '#unlinkedBugsForm');
|
||||
setTimeout(function(){fixedTfootAction(formID)}, 100);
|
||||
autoCheck();
|
||||
checkTable($(formID).find('table'));
|
||||
});
|
||||
}
|
||||
$(function()
|
||||
|
||||
@@ -192,6 +192,7 @@ class sso extends control
|
||||
*/
|
||||
public function getUserPairs()
|
||||
{
|
||||
if(!$this->sso->checkKey()) return false;
|
||||
$users = $this->loadModel('user')->getPairs('noclosed,nodeleted');
|
||||
die(json_encode($users));
|
||||
}
|
||||
@@ -204,6 +205,7 @@ class sso extends control
|
||||
*/
|
||||
public function getBindUsers()
|
||||
{
|
||||
if(!$this->sso->checkKey()) return false;
|
||||
$users = $this->sso->getBindUsers();
|
||||
die(json_encode($users));
|
||||
}
|
||||
@@ -250,6 +252,8 @@ class sso extends control
|
||||
*/
|
||||
public function getTodoList($account = '')
|
||||
{
|
||||
if(!$this->sso->checkKey()) return false;
|
||||
|
||||
$datas = array();
|
||||
$datas['task'] = $this->dao->select("id, name")->from(TABLE_TASK)->where('assignedTo')->eq($account)->andWhere('status')->in('wait,doing')->fetchPairs();
|
||||
$datas['bug'] = $this->dao->select("id, title")->from(TABLE_BUG)->where('assignedTo')->eq($account)->andWhere('status')->eq('active')->fetchPairs();
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if($cases):?>
|
||||
<tbody>
|
||||
<?php foreach($cases as $case):?>
|
||||
<tr class='text-center'>
|
||||
@@ -74,3 +75,4 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -26,12 +26,13 @@
|
||||
<th class='w-120px {sorter: false}'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
|
||||
$canBatchAssign = common::hasPriv('testtask', 'batchAssign');
|
||||
$canBatchRun = common::hasPriv('testtask', 'batchRun');
|
||||
?>
|
||||
<?php if($runs):?>
|
||||
<tbody>
|
||||
<?php
|
||||
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
|
||||
$canBatchAssign = common::hasPriv('testtask', 'batchAssign');
|
||||
$canBatchRun = common::hasPriv('testtask', 'batchRun');
|
||||
?>
|
||||
<?php foreach($runs as $run):?>
|
||||
<tr class='text-center'>
|
||||
<td class='text-left'>
|
||||
@@ -68,3 +69,4 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -31,8 +31,8 @@ class tutorial extends control
|
||||
{
|
||||
$setting = isset($this->config->tutorial->tasks->setting) ? $this->config->tutorial->tasks->setting : '';
|
||||
|
||||
$this->session->set('tutorialMode', true);
|
||||
$this->loadModel('setting')->setItem($this->app->user->account . '.common.global.novice', true);
|
||||
$this->session->set('tutorialMode', true);
|
||||
|
||||
$this->view->title = $this->lang->tutorial->common;
|
||||
$this->view->current = $task;
|
||||
@@ -55,7 +55,9 @@ class tutorial extends control
|
||||
if($finish == 'keepAll') $this->send(array('result' => 'fail', 'message' => $this->lang->tutorial->ajaxSetError));
|
||||
|
||||
$account = $this->app->user->account;
|
||||
$this->session->set('tutorialMode', false);
|
||||
$this->loadModel('setting')->setItem("$account.tutorial.tasks.setting", $finish);
|
||||
$this->session->set('tutorialMode', true);
|
||||
$this->send(array('result' => 'success'));
|
||||
}
|
||||
|
||||
|
||||
@@ -660,7 +660,7 @@ class user extends control
|
||||
if($this->post->account) $account = $this->post->account;
|
||||
if($this->get->account) $account = $this->get->account;
|
||||
if($this->post->password) $password = $this->post->password;
|
||||
if($this->get->password) $password = $this->get->password;
|
||||
if($this->get->password) $password = base64_decode($this->get->password);
|
||||
|
||||
if($this->user->checkLocked($account))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user