Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -1644,10 +1644,12 @@ class block extends control
|
||||
*/
|
||||
public function printAssignToMeBlock($longBlock = true)
|
||||
{
|
||||
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
|
||||
if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true;
|
||||
if(common::hasPriv('bug', 'view')) $hasViewPriv['bug'] = true;
|
||||
if(common::hasPriv('risk', 'view')) $hasViewPriv['risk'] = true;
|
||||
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
|
||||
if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true;
|
||||
if(common::hasPriv('bug', 'view')) $hasViewPriv['bug'] = true;
|
||||
if(common::hasPriv('risk', 'view')) $hasViewPriv['risk'] = true;
|
||||
if(common::hasPriv('issue', 'view')) $hasViewPriv['issue'] = true;
|
||||
if(common::hasPriv('story', 'view')) $hasViewPriv['story'] = true;
|
||||
|
||||
$params = $this->get->param;
|
||||
$params = json_decode(base64_decode($params));
|
||||
@@ -1720,6 +1722,34 @@ class block extends control
|
||||
$count['risk'] = count($risks);
|
||||
$this->view->risks = $risks;
|
||||
}
|
||||
if(isset($hasViewPriv['issue']))
|
||||
{
|
||||
$this->app->loadLang('issue');
|
||||
$stmt = $this->dao->select('*')->from(TABLE_ISSUE)
|
||||
->where('assignedTo')->eq($this->app->user->account)
|
||||
->andWhere('deleted')->eq('0')
|
||||
->andWhere('status')->ne('closed')
|
||||
->orderBy('id_desc');
|
||||
if(isset($params->issueNum)) $stmt->limit($params->issueNum);
|
||||
$issues = $stmt->fetchAll();
|
||||
|
||||
$count['issue'] = count($issues);
|
||||
$this->view->issues = $issues;
|
||||
}
|
||||
if(isset($hasViewPriv['story']))
|
||||
{
|
||||
$this->app->loadLang('story');
|
||||
$stmt = $this->dao->select('*')->from(TABLE_STORY)
|
||||
->where('assignedTo')->eq($this->app->user->account)
|
||||
->andWhere('deleted')->eq('0')
|
||||
->andWhere('status')->ne('closed')
|
||||
->orderBy('id_desc');
|
||||
if(isset($params->storyNum)) $stmt->limit($params->storyNum);
|
||||
$stories = $stmt->fetchAll();
|
||||
|
||||
$count['story'] = count($stories);
|
||||
$this->view->stories = $stories;
|
||||
}
|
||||
|
||||
$this->view->selfCall = $this->selfCall;
|
||||
$this->view->hasViewPriv = $hasViewPriv;
|
||||
|
||||
@@ -313,6 +313,7 @@ $lang->block->availableBlocks->release = 'Release';
|
||||
$lang->block->availableBlocks->build = 'Build';
|
||||
$lang->block->availableBlocks->testtask = 'Testaufgaben';
|
||||
$lang->block->availableBlocks->risk = 'My Risks';
|
||||
$lang->block->availableBlocks->issue = 'My Issues';
|
||||
|
||||
$lang->block->moduleList['project'] = 'Project';
|
||||
$lang->block->moduleList['product'] = $lang->productCommon;
|
||||
@@ -424,10 +425,12 @@ $lang->block->orderByList->story['status_desc'] = 'Status Absteigend';
|
||||
$lang->block->orderByList->story['stage_asc'] = 'Phase Aufsteigend';
|
||||
$lang->block->orderByList->story['stage_desc'] = 'Phase Absteigend';
|
||||
|
||||
$lang->block->todoNum = 'Todos';
|
||||
$lang->block->taskNum = 'Aufgaben';
|
||||
$lang->block->bugNum = 'Bugs';
|
||||
$lang->block->riskNum = 'Risk';
|
||||
$lang->block->todoNum = 'Todos';
|
||||
$lang->block->taskNum = 'Aufgaben';
|
||||
$lang->block->bugNum = 'Bugs';
|
||||
$lang->block->riskNum = 'Risk';
|
||||
$lang->block->issueNum = 'Issues';
|
||||
$lang->block->storyNum = 'Stories';
|
||||
|
||||
$lang->block->typeList = new stdclass();
|
||||
|
||||
|
||||
@@ -313,6 +313,7 @@ $lang->block->availableBlocks->release = 'Releases';
|
||||
$lang->block->availableBlocks->build = 'Builds';
|
||||
$lang->block->availableBlocks->testtask = 'Requests';
|
||||
$lang->block->availableBlocks->risk = 'My Risks';
|
||||
$lang->block->availableBlocks->issue = 'My Issues';
|
||||
|
||||
$lang->block->moduleList['project'] = 'Project';
|
||||
$lang->block->moduleList['product'] = $lang->productCommon;
|
||||
@@ -424,10 +425,12 @@ $lang->block->orderByList->story['status_desc'] = 'Story Status DESC';
|
||||
$lang->block->orderByList->story['stage_asc'] = 'Story Phase ASC';
|
||||
$lang->block->orderByList->story['stage_desc'] = 'Story Phase DESC';
|
||||
|
||||
$lang->block->todoNum = 'Todo';
|
||||
$lang->block->taskNum = 'Task';
|
||||
$lang->block->bugNum = 'Bug';
|
||||
$lang->block->riskNum = 'Risk';
|
||||
$lang->block->todoNum = 'Todo';
|
||||
$lang->block->taskNum = 'Task';
|
||||
$lang->block->bugNum = 'Bug';
|
||||
$lang->block->riskNum = 'Risk';
|
||||
$lang->block->issueNum = 'Issues';
|
||||
$lang->block->storyNum = 'Stories';
|
||||
|
||||
$lang->block->typeList = new stdclass();
|
||||
|
||||
|
||||
@@ -313,6 +313,7 @@ $lang->block->availableBlocks->release = 'Releases';
|
||||
$lang->block->availableBlocks->build = 'Builds';
|
||||
$lang->block->availableBlocks->testtask = 'Recettes';
|
||||
$lang->block->availableBlocks->risk = 'My Risks';
|
||||
$lang->block->availableBlocks->issue = 'My Issues';
|
||||
|
||||
$lang->block->moduleList['project'] = $lang->projectCommon;
|
||||
$lang->block->moduleList['product'] = $lang->productCommon;
|
||||
@@ -424,10 +425,12 @@ $lang->block->orderByList->story['status_desc'] = 'Tri par Statut Story DESC';
|
||||
$lang->block->orderByList->story['stage_asc'] = 'Tri par Phase Story ASC';
|
||||
$lang->block->orderByList->story['stage_desc'] = 'Tri par Phase Story DESC';
|
||||
|
||||
$lang->block->todoNum = 'Todo';
|
||||
$lang->block->taskNum = 'Task';
|
||||
$lang->block->bugNum = 'Bug';
|
||||
$lang->block->riskNum = 'Risk';
|
||||
$lang->block->todoNum = 'Todo';
|
||||
$lang->block->taskNum = 'Task';
|
||||
$lang->block->bugNum = 'Bug';
|
||||
$lang->block->riskNum = 'Risk';
|
||||
$lang->block->issueNum = 'Issues';
|
||||
$lang->block->storyNum = 'Stories';
|
||||
|
||||
$lang->block->typeList = new stdclass();
|
||||
|
||||
|
||||
@@ -313,6 +313,7 @@ $lang->block->availableBlocks->release = 'Phát hành';
|
||||
$lang->block->availableBlocks->build = 'Bản dựng';
|
||||
$lang->block->availableBlocks->testtask = 'Yêu cầu';
|
||||
$lang->block->availableBlocks->risk = 'My Risks';
|
||||
$lang->block->availableBlocks->issue = 'My Issues';
|
||||
|
||||
$lang->block->moduleList['project'] = $lang->projectCommon;
|
||||
$lang->block->moduleList['product'] = $lang->productCommon;
|
||||
@@ -424,10 +425,12 @@ $lang->block->orderByList->story['status_desc'] = 'Tình trạng câu chuyện g
|
||||
$lang->block->orderByList->story['stage_asc'] = 'Giai đoạn câu chuyện tăng dần';
|
||||
$lang->block->orderByList->story['stage_desc'] = 'Giai đoạn câu chuyện giảm dần';
|
||||
|
||||
$lang->block->todoNum = 'Việc làm';
|
||||
$lang->block->taskNum = 'Nhiệm vụ';
|
||||
$lang->block->bugNum = 'Bug';
|
||||
$lang->block->riskNum = 'Risk';
|
||||
$lang->block->todoNum = 'Việc làm';
|
||||
$lang->block->taskNum = 'Nhiệm vụ';
|
||||
$lang->block->bugNum = 'Bug';
|
||||
$lang->block->riskNum = 'Risk';
|
||||
$lang->block->issueNum = 'Issues';
|
||||
$lang->block->storyNum = 'Stories';
|
||||
|
||||
$lang->block->typeList = new stdclass();
|
||||
|
||||
|
||||
@@ -314,6 +314,7 @@ $lang->block->availableBlocks->release = '发布列表';
|
||||
$lang->block->availableBlocks->build = '版本列表';
|
||||
$lang->block->availableBlocks->testtask = '测试版本列表';
|
||||
$lang->block->availableBlocks->risk = '我的风险';
|
||||
$lang->block->availableBlocks->issue = '我的问题';
|
||||
|
||||
$lang->block->moduleList['project'] = '项目';
|
||||
$lang->block->moduleList['product'] = $lang->productCommon;
|
||||
@@ -425,10 +426,12 @@ $lang->block->orderByList->story['status_desc'] = '状态倒序';
|
||||
$lang->block->orderByList->story['stage_asc'] = '阶段正序';
|
||||
$lang->block->orderByList->story['stage_desc'] = '阶段倒序';
|
||||
|
||||
$lang->block->todoNum = '待办数';
|
||||
$lang->block->taskNum = '任务数';
|
||||
$lang->block->bugNum = 'Bug数';
|
||||
$lang->block->riskNum = '风险数';
|
||||
$lang->block->todoNum = '待办数';
|
||||
$lang->block->taskNum = '任务数';
|
||||
$lang->block->bugNum = 'Bug数';
|
||||
$lang->block->riskNum = '风险数';
|
||||
$lang->block->issueNum = '问题数';
|
||||
$lang->block->storyNum = '需求数';
|
||||
|
||||
$lang->block->typeList = new stdclass();
|
||||
|
||||
|
||||
@@ -314,6 +314,7 @@ $lang->block->availableBlocks->release = '發佈列表';
|
||||
$lang->block->availableBlocks->build = '版本列表';
|
||||
$lang->block->availableBlocks->testtask = '測試版本列表';
|
||||
$lang->block->availableBlocks->risk = '我的風險';
|
||||
$lang->block->availableBlocks->issue = '我的問題';
|
||||
|
||||
$lang->block->moduleList['project'] = '項目';
|
||||
$lang->block->moduleList['product'] = $lang->productCommon;
|
||||
@@ -425,10 +426,12 @@ $lang->block->orderByList->story['status_desc'] = '狀態倒序';
|
||||
$lang->block->orderByList->story['stage_asc'] = '階段正序';
|
||||
$lang->block->orderByList->story['stage_desc'] = '階段倒序';
|
||||
|
||||
$lang->block->todoNum = '待辦數';
|
||||
$lang->block->taskNum = '任務數';
|
||||
$lang->block->bugNum = 'Bug數';
|
||||
$lang->block->riskNum = '風險數';
|
||||
$lang->block->todoNum = '待辦數';
|
||||
$lang->block->taskNum = '任務數';
|
||||
$lang->block->bugNum = 'Bug數';
|
||||
$lang->block->riskNum = '風險數';
|
||||
$lang->block->issueNum = '問題數';
|
||||
$lang->block->storyNum = '需求數';
|
||||
|
||||
$lang->block->typeList = new stdclass();
|
||||
|
||||
|
||||
@@ -713,6 +713,12 @@ class blockModel extends model
|
||||
return json_encode($this->appendCountParams($params));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get assign to me params.
|
||||
*
|
||||
* @access public
|
||||
* @return json
|
||||
*/
|
||||
public function getAssignToMeParams()
|
||||
{
|
||||
$params->todoNum['name'] = $this->lang->block->todoNum;
|
||||
@@ -731,6 +737,14 @@ class blockModel extends model
|
||||
$params->riskNum['default'] = 20;
|
||||
$params->riskNum['control'] = 'input';
|
||||
|
||||
$params->issueNum['name'] = $this->lang->block->issueNum;
|
||||
$params->issueNum['default'] = 20;
|
||||
$params->issueNum['control'] = 'input';
|
||||
|
||||
$params->storyNum['name'] = $this->lang->block->storyNum;
|
||||
$params->storyNum['default'] = 20;
|
||||
$params->storyNum['control'] = 'input';
|
||||
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php if(empty($issues)): ?>
|
||||
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
|
||||
<?php else:?>
|
||||
<style>
|
||||
.block-issues .c-id {width: 50px;}
|
||||
.block-issues .c-pri {width: 50px;text-align: center;}
|
||||
.block-issues .c-createdDate {width: 95px;}
|
||||
.block-issues .c-severity {width: 80px;}
|
||||
.block-issues .c-status {width: 80px;}
|
||||
.block-issues.block-sm .c-status {text-align: center;}
|
||||
</style>
|
||||
<div class='panel-body has-table scrollbar-hover'>
|
||||
<table class='table table-borderless table-fixed table-fixed-head table-hover tablesorter block-issues <?php if(!$longBlock) echo 'block-sm'?>'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'><?php echo $lang->idAB?></th>
|
||||
<th class='c-name'><?php echo $lang->issue->title?></th>
|
||||
<?php if($longBlock):?>
|
||||
<th class='c-pri'><?php echo $lang->priAB?></th>
|
||||
<th class='c-category'><?php echo $lang->issue->severity;?></th>
|
||||
<th class='c-identifiedDate'><?php echo $lang->issue->createdDate;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-status'><?php echo $lang->issue->status;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($issues as $issue):?>
|
||||
<?php
|
||||
$appid = isset($_GET['entry']) ? "class='app-btn' data-id='{$this->get->entry}'" : '';
|
||||
?>
|
||||
<tr>
|
||||
<td class='c-id-xs'><?php echo sprintf('%03d', $issue->id);?></td>
|
||||
<td class='c-name' title='<?php echo $issue->title?>'><?php echo html::a($this->createLink('issue', 'view', "issueID=$issue->id", '', '', $issue->PRJ), $issue->title)?></td>
|
||||
<?php if($longBlock):?>
|
||||
<td class='c-pri'><?php echo zget($lang->issue->priList, $issue->pri)?></td>
|
||||
<td class='c-severity'><?php echo zget($lang->issue->severityList, $issue->severity)?></td>
|
||||
<td class='c-createdDate'><?php echo $issue->createdDate == '0000-00-00' ? '' : $issue->createdDate;?></td>
|
||||
<?php endif;?>
|
||||
<?php $status = $this->processStatus('issue', $issue);?>
|
||||
<td class='c-status' title='<?php echo $status;?>'>
|
||||
<span class="status-issue status-<?php echo $issue->status?>"><?php echo $status;?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -30,7 +30,7 @@
|
||||
?>
|
||||
<tr>
|
||||
<td class='c-id-xs'><?php echo sprintf('%03d', $risk->id);?></td>
|
||||
<td class='c-name' title='<?php echo $risk->name?>'><?php echo html::a($this->createLink('risk', 'view', "riskID=$risk->id", '', '', $risk->program), $risk->name)?></td>
|
||||
<td class='c-name' title='<?php echo $risk->name?>'><?php echo html::a($this->createLink('risk', 'view', "riskID=$risk->id", '', '', $risk->PRJ), $risk->name)?></td>
|
||||
<?php if($longBlock):?>
|
||||
<td class='c-pri'><?php echo zget($lang->risk->priList, $risk->pri)?></td>
|
||||
<td class='c-category'><?php echo zget($lang->risk->categoryList, $risk->category)?></td>
|
||||
|
||||
@@ -45,7 +45,7 @@ class commonModel extends model
|
||||
public function sendHeader()
|
||||
{
|
||||
header("Content-Type: text/html; Language={$this->config->charset}");
|
||||
header("X-Frame-Options: SAMEORIGIN");
|
||||
if(!$this->loadModel('setting')->getItem('owner=system&module=sso&key=turnon')) header("X-Frame-Options: SAMEORIGIN");
|
||||
header("Cache-control: private");
|
||||
}
|
||||
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user