* fix bug and adjust for createLink params.
This commit is contained in:
@@ -443,12 +443,10 @@ class actionModel extends model
|
||||
$action->extra = strtolower($extra);
|
||||
if($id)
|
||||
{
|
||||
$table = $this->config->objectTables[$action->extra];
|
||||
$field = $this->config->action->objectNameFields[$action->extra];
|
||||
$object = $this->dao->select($field . ',project')->from($table)->where('id')->eq($id)->fetch();
|
||||
$name = $object->$field;
|
||||
$projectID = $object->project;
|
||||
if($name) $action->appendLink = html::a(helper::createLink($action->extra, 'view', "id=$id", '', '', $projectID), "#$id " . $name);
|
||||
$table = $this->config->objectTables[$action->extra];
|
||||
$field = $this->config->action->objectNameFields[$action->extra];
|
||||
$name = $this->dao->select($field)->from($table)->where('id')->eq($id)->fetch($field);
|
||||
if($name) $action->appendLink = html::a(helper::createLink($action->extra, 'view', "id=$id"), "#$id " . $name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,11 +55,11 @@
|
||||
<?php
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
echo html::a($this->createLink('project', 'index', 'project=' . $project->id, '', false, $project->id), $project->name, '_parent');
|
||||
echo html::a($this->createLink('project', 'index', 'project=' . $project->id), $project->name, '_parent');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a($this->createLink('execution', 'task', 'project=' . $project->id, '', false, $project->id), $project->name, '_parent');
|
||||
echo html::a($this->createLink('execution', 'task', 'project=' . $project->id), $project->name, '_parent');
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<?php echo html::checkbox('bugs', array($bug->id => sprintf('%03d', $bug->id)));?>
|
||||
</td>
|
||||
<td><span class='label-pri label-pri-<?php echo $bug->pri;?>' title='<?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?></span></td>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', true, $bug->project), $bug->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', true), $bug->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td><?php echo zget($users, $bug->openedBy);?></td>
|
||||
<td><?php echo zget($users, $bug->assignedTo);?></td>
|
||||
<td>
|
||||
|
||||
@@ -392,7 +392,7 @@
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td><span class='label-pri label-pri-<?php echo $bug->pri;?>' title='<?php echo zget($lang->bug->priList, $bug->pri, $bug->pri);?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri);?></span></td>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', false, $bug->project), $bug->title);?></td>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
|
||||
<td><?php echo zget($users, $bug->openedBy);?></td>
|
||||
<td><?php echo zget($users, $bug->assignedTo);?></td>
|
||||
<td>
|
||||
|
||||
@@ -577,29 +577,29 @@ class searchModel extends model
|
||||
if(!isset($this->config->objectTables[$record->objectType])) continue;
|
||||
$table = $this->config->objectTables[$record->objectType];
|
||||
$projectID = $this->dao->select('project')->from($table)->where('id')->eq($record->objectID)->fetch('project');
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, $projectID);
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}");
|
||||
}
|
||||
elseif($module == 'issue')
|
||||
{
|
||||
$issue = $this->dao->select('id,project,owner')->from(TABLE_ISSUE)->where('id')->eq($record->objectID)->fetch();
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, $issue->project);
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}");
|
||||
$record->extraType = empty($issue->owner) ? 'commonIssue' : 'stakeholderIssue';
|
||||
}
|
||||
elseif($module == 'execution')
|
||||
{
|
||||
$execution = $this->dao->select('id,type,project')->from(TABLE_EXECUTION)->where('id')->eq($record->objectID)->fetch();
|
||||
$record->url = helper::createLink('execution', $method, "id={$record->objectID}", '', false, $execution->project);
|
||||
$record->url = helper::createLink('execution', $method, "id={$record->objectID}");
|
||||
$record->extraType = $execution->type;
|
||||
}
|
||||
elseif($module == 'story')
|
||||
{
|
||||
$story = $this->dao->select('id,type')->from(TABLE_STORY)->where('id')->eq($record->objectID)->fetch();
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, 0, true);
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}");
|
||||
$record->extraType = $story->type;
|
||||
}
|
||||
else
|
||||
{
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, 0, true);
|
||||
$record->url = helper::createLink($module, $method, "id={$record->objectID}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<?php endif;?>
|
||||
<td>
|
||||
<?php foreach($story->cases as $caseID => $case):?>
|
||||
<?php echo html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', false, $case->project), $case->title, '', "title='$case->title'") . '<br/>';?>
|
||||
<?php echo html::a($this->createLink('testcase', 'view', "caseID=$caseID"), $case->title, '', "title='$case->title'") . '<br/>';?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
<?php if(isset($config->maxVersion)):?>
|
||||
|
||||
@@ -51,11 +51,11 @@
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', false, $bug->project), $bug->id, '_blank');?></td>
|
||||
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->id, '_blank');?></td>
|
||||
<td><span class='<?php echo 'severity' . zget($lang->bug->severityList, $bug->severity, $bug->severity)?>'><?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity)?></span></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?></span></td>
|
||||
<td><?php echo $lang->bug->typeList[$bug->type]?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', false, $bug->project), $bug->title);?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
|
||||
<td><?php echo zget($users, $bug->openedBy);?></td>
|
||||
<td><?php echo zget($users, $bug->resolvedBy);?></td>
|
||||
<td><?php echo zget($lang->bug->resolutionList, $bug->resolution);?></td>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($executions as $execution):?>
|
||||
<?php $executionLink = $this->createLink('execution', 'view', "executionID=$execution->id", '', false, $execution->project);?>
|
||||
<?php $executionLink = $this->createLink('execution', 'view', "executionID=$execution->id");?>
|
||||
<tr>
|
||||
<td><?php echo html::a($executionLink, $execution->id);?></td>
|
||||
<td>
|
||||
|
||||
@@ -55,13 +55,13 @@
|
||||
<tbody>
|
||||
<?php foreach($tasks as $task):?>
|
||||
<tr class='text-left'>
|
||||
<td><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', false, $task->project), sprintf('%03d', $task->id));?></td>
|
||||
<td><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->task->priList, $task->pri, $task->pri);?>'><?php echo $task->pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri)?></span></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('execution', 'browse', "executionID=$task->executionID", '', false, $task->project), $task->executionName);?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('execution', 'browse', "executionID=$task->executionID"), $task->executionName);?></td>
|
||||
<td class='text-left nobr'>
|
||||
<?php if(!empty($task->team)) echo '<span class="label label-badge label-light">' . $this->lang->task->multipleAB . '</span> ';?>
|
||||
<?php if($task->parent > 0) echo '<span class="label label-badge label-light">' . $this->lang->task->childrenAB . '</span> ';?>
|
||||
<?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', false, $task->project), $task->name, null, "style='color: $task->color'");?>
|
||||
<?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), $task->name, null, "style='color: $task->color'");?>
|
||||
</td>
|
||||
<td class='hours' title="<?php echo $task->estimate . ' ' . $lang->execution->workHour;?>"><?php echo $task->estimate . $lang->execution->workHourUnit;?></td>
|
||||
<td class='hours' title="<?php echo $task->consumed . ' ' . $lang->execution->workHour;?>"><?php echo $task->consumed . $lang->execution->workHourUnit;?></td>
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
<?php foreach($cases as $case):?>
|
||||
<?php $caseID = $type == 'case2Him' ? $case->case : $case->id?>
|
||||
<tr class='text-left'>
|
||||
<td><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version", '', false, $case->project), sprintf('%03d', $caseID));?></td>
|
||||
<td><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version"), sprintf('%03d', $caseID));?></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version", '', false, $case->project), $case->title);?></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version"), $case->title);?></td>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
<td><?php echo zget($users, $case->openedBy);?></td>
|
||||
<td><?php echo zget($users, $case->lastRunner);?></td>
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
<tbody>
|
||||
<?php foreach($tasks as $task):?>
|
||||
<tr>
|
||||
<td><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id", '', false, $task->project), sprintf('%03d', $task->id));?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id", '', false, $task->project), $task->name);?></td>
|
||||
<td><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id"), $task->name);?></td>
|
||||
<td class='nobr'><?php echo $task->executionName?></td>
|
||||
<td class='nobr'><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build", '', false, $task->project), $task->buildName));?></td>
|
||||
<td class='nobr'><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?></td>
|
||||
<td><?php echo $task->begin?></td>
|
||||
<td><?php echo $task->end?></td>
|
||||
<td class='task-<?php echo $task->status?>'><?php echo $this->processStatus('testtask', $task);?></td>
|
||||
|
||||
Reference in New Issue
Block a user