* code for task icons.
This commit is contained in:
@@ -176,6 +176,7 @@ class project extends control
|
||||
$taskQuery = $this->loadModel('search')->replaceDynamic($taskQuery);
|
||||
|
||||
$this->session->set('taskQueryCondition', $taskQuery);
|
||||
$this->session->set('taskOnlyCondition', true);
|
||||
$this->session->set('taskOrderBy', $orderBy);
|
||||
$tasks = $this->project->getSearchTasks($taskQuery, $pager, $orderBy);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ var browseType = '<?php echo $browseType;?>';
|
||||
<th class='w-40px'> <?php common::printOrderLink('consumed', $orderBy, $vars, $lang->task->consumedAB);?></th>
|
||||
<th class='w-40px'> <?php common::printOrderLink('left', $orderBy, $vars, $lang->task->leftAB);?></th>
|
||||
<th><?php common::printOrderLink('story', $orderBy, $vars, $lang->task->story);?></th>
|
||||
<th class='w-100px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -120,7 +120,12 @@ var browseType = '<?php echo $browseType;?>';
|
||||
</td>
|
||||
<td class='a-right'>
|
||||
<?php
|
||||
if($browseType == 'needconfirm') common::printLink('task', 'confirmStoryChange', "taskid=$task->id", $lang->confirm, 'hiddenwin');
|
||||
common::printIcon('task', 'record', "taskID=$task->id", $task, 'list');
|
||||
if($browseType == 'needconfirm')
|
||||
{
|
||||
$lang->task->confirmStoryChange = $lang->confirm;
|
||||
common::printIcon('task', 'confirmStoryChange', "taskid=$task->id", '', 'list', '', 'hiddenwin');
|
||||
}
|
||||
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'list');
|
||||
common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list');
|
||||
common::printIcon('task', 'close', "taskID=$task->id", $task, 'list');
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='featurebar'>
|
||||
<div class='f-left'><?php echo $lang->story->report->common;?></div>
|
||||
<div class='f-right'><?php common::printLink('product', 'browse', "productID=$productID&browseType=$browseType&moduleID=$moduleID", $lang->goback); ?></div>
|
||||
<div class='f-right'><?php common::printRPN($this->createLink('product', 'browse', "productID=$productID&browseType=$browseType&moduleID=$moduleID")); ?></div>
|
||||
</div>
|
||||
|
||||
<table class='cont-lt1'>
|
||||
|
||||
@@ -648,7 +648,7 @@ class taskModel extends model
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task');
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task', $type == 'needconfirm' ? false : true);
|
||||
|
||||
if($tasks) return $this->processTasks($tasks);
|
||||
return array();
|
||||
@@ -883,7 +883,7 @@ class taskModel extends model
|
||||
{
|
||||
$datas = $this->dao->select('project as name, count(*) as value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->groupBy('project')
|
||||
->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
@@ -903,7 +903,7 @@ class taskModel extends model
|
||||
{
|
||||
$datas = $this->dao->select('module as name, count(*) as value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->groupBy('module')
|
||||
->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
@@ -923,7 +923,7 @@ class taskModel extends model
|
||||
{
|
||||
$datas = $this->dao->select('assignedTo AS name, count(*) AS value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->groupBy('assignedTo')
|
||||
->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
@@ -943,7 +943,7 @@ class taskModel extends model
|
||||
{
|
||||
$datas = $this->dao->select('type AS name, count(*) AS value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->groupBy('type')
|
||||
->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
@@ -962,7 +962,7 @@ class taskModel extends model
|
||||
{
|
||||
return $this->dao->select('pri AS name, COUNT(*) AS value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->groupBy('pri')
|
||||
->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
@@ -978,7 +978,7 @@ class taskModel extends model
|
||||
{
|
||||
return $this->dao->select('deadline AS name, COUNT(*) AS value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->groupBy('deadline')
|
||||
->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
@@ -994,7 +994,7 @@ class taskModel extends model
|
||||
{
|
||||
return $this->dao->select('estimate AS name, COUNT(*) AS value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->groupBy('estimate')
|
||||
->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
@@ -1010,7 +1010,7 @@ class taskModel extends model
|
||||
{
|
||||
return $this->dao->select('`left` AS name, COUNT(*) AS value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->groupBy('`left`')
|
||||
->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
@@ -1026,7 +1026,7 @@ class taskModel extends model
|
||||
{
|
||||
return $this->dao->select('consumed AS name, COUNT(*) AS value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->groupBy('consumed')
|
||||
->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
@@ -1042,7 +1042,7 @@ class taskModel extends model
|
||||
{
|
||||
$datas = $this->dao->select('finishedBy AS name, COUNT(finishedBy) AS value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->andWhere('finishedBy')->ne('')
|
||||
->groupBy('finishedBy')
|
||||
->orderBy('value DESC')
|
||||
@@ -1063,7 +1063,7 @@ class taskModel extends model
|
||||
{
|
||||
$datas = $this->dao->select('closedReason AS name, COUNT(*) AS value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->groupBy('closedReason')
|
||||
->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
@@ -1088,7 +1088,7 @@ class taskModel extends model
|
||||
{
|
||||
$datas= $this->dao->select('DATE_FORMAT(finishedDate, "%Y-%m-%d") AS date, COUNT(*) AS value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->groupBy('date')
|
||||
->having('date != "0000-00-00"')
|
||||
->orderBy('finishedDate')
|
||||
@@ -1113,7 +1113,7 @@ class taskModel extends model
|
||||
{
|
||||
$datas = $this->dao->select('status AS name, COUNT(status) AS value')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->where($this->session->taskQueryCondition)
|
||||
->where($this->reportCondition())
|
||||
->groupBy('status')
|
||||
->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
@@ -1147,4 +1147,16 @@ class taskModel extends model
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get report condition from session.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function reportCondition()
|
||||
{
|
||||
if(!$this->session->taskOnlyCondition) return 'id in (' . preg_replace('/SELECT .* FROM/', 'SELECT t1.id FROM', $this->session->taskQueryCondition) . ')';
|
||||
return $this->session->taskQueryCondition;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='featurebar'>
|
||||
<div class='f-left'><?php echo $lang->report->common;?></div>
|
||||
<div class='f-right'><?php common::printLink('project', 'task', "projectID=$projectID&browseType=$browseType", $lang->goback); ?></div>
|
||||
<div class='f-right'><?php common::printRPN($this->createLink('project', 'task', "projectID=$projectID&browseType=$browseType")); ?></div>
|
||||
</div>
|
||||
|
||||
<table class='cont-lt1'>
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
if(!$task->deleted)
|
||||
{
|
||||
ob_start();
|
||||
//if(!($task->status != 'closed' and $task->status != 'cancel' and common::printLink('task', 'logEfforts', "taskID=$task->id", $lang->task->buttonLogEfforts))) echo $lang->task->buttonLogEfforts . ' ';
|
||||
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task);
|
||||
common::printIcon('task', 'start', "taskID=$task->id", $task);
|
||||
common::printIcon('task', 'record', "taskID=$task->id", $task);
|
||||
|
||||
@@ -474,6 +474,8 @@ table.tablesorter thead tr .headerSortDown {background-image: url(./images/table
|
||||
#featurebar .f-right .icon-green-story-batchCreate {padding:2px 7px 2px 10px; background:url(images/main/zt-icons.png) -20px -202px;}
|
||||
|
||||
/* Task icons. */
|
||||
.icon-green-task-confirmStoryChange {padding:2px 8px; background:url(images/main/zt-icons.png) -60px -201px;}
|
||||
|
||||
.icon-green-task-assignTo {padding:2px 8px; background:url(images/main/zt-icons.png) -40px -242px;}
|
||||
.icon-gray-task-assignTo {padding:2px 8px; background:url(images/main/zt-icons.png) -40px -262px;}
|
||||
|
||||
@@ -536,6 +538,10 @@ table.tablesorter thead tr .headerSortDown {background-image: url(./images/table
|
||||
/* Effort icons. */
|
||||
.icon-green-effort-createForObject {padding:2px 8px; background:url(images/main/zt-icons.png) -80px -2px;}
|
||||
|
||||
/* Record icons. */
|
||||
.icon-green-task-record {padding:2px 8px; background:url(images/main/zt-icons.png) -80px -2px;}
|
||||
.icon-gray-task-record {padding:2px 8px; background:url(images/main/zt-icons.png) -80px -22px;}
|
||||
|
||||
|
||||
/* Todo icons. */
|
||||
#featurebar .f-right .icon-green-todo-batchCreate {padding:2px 8px; background:url(images/main/zt-icons.png) -20px -202px;}
|
||||
@@ -544,5 +550,5 @@ table.tablesorter thead tr .headerSortDown {background-image: url(./images/table
|
||||
.log-desc {padding:2px 6px; background:url(images/main/zt-icons.png) -22px -422px;}
|
||||
.change-hide {padding:2px 6px; background:url(images/main/zt-icons.png) -42px -422px; border:0px;}
|
||||
.change-show {padding:2px 6px; background:url(images/main/zt-icons.png) -62px -422px; border:0px;}
|
||||
.diff-all {padding:2px 6px; background:url(images/main/zt-icons.png) -81px -420px; border:0px}
|
||||
.diff-all {padding:2px 6px; background:url(images/main/zt-icons.png) -81px -422px; border:0px}
|
||||
.diff-short {padding:2px 6px; background:url(images/main/zt-icons.png) -101px -422px; border:0px}
|
||||
|
||||
Reference in New Issue
Block a user