* fix errors.
This commit is contained in:
@@ -501,7 +501,7 @@ EOT;
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public static function linkButton($label = '', $link = '', $target = 'self', $misc = '', $class)
|
||||
public static function linkButton($label = '', $link = '', $target = 'self', $misc = '', $class = '')
|
||||
{
|
||||
global $config, $lang;
|
||||
|
||||
|
||||
@@ -240,16 +240,17 @@ class actionModel extends model
|
||||
}
|
||||
foreach($typeTrashes as $objectType => $objectIds)
|
||||
{
|
||||
if(!isset($this->config->objectTables[$objectType]))continue;
|
||||
|
||||
$objectIds = array_unique($objectIds);
|
||||
$table = $this->config->objectTables[$objectType];
|
||||
$field = $this->config->action->objectNameFields[$objectType];
|
||||
|
||||
if(!$table) continue;
|
||||
$objectNames[$objectType] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchPairs();
|
||||
}
|
||||
|
||||
/* Add name field to the trashes. */
|
||||
foreach($trashes as $trash) $trash->objectName = $objectNames[$trash->objectType][$trash->objectID];
|
||||
foreach($trashes as $trash) $trash->objectName = isset($objectNames[$trash->objectType][$trash->objectID]) ? $objectNames[$trash->objectType][$trash->objectID] : '';
|
||||
return $trashes;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<?php foreach($trashes as $action):?>
|
||||
<?php $module = $action->objectType == 'case' ? 'testcase' : $action->objectType;?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $lang->action->objectTypes[$action->objectType];?></td>
|
||||
<td><?php echo zget($lang->action->objectTypes, $action->objectType, '');?></td>
|
||||
<td><?php echo $action->objectID;?></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink($module, 'view', "id=$action->objectID"), $action->objectName);?></td>
|
||||
<td><?php echo $users[$action->actor];?></td>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='9'>
|
||||
<td colspan='10'>
|
||||
<?php if($bugs and $canBatchEdit):?>
|
||||
<div class='table-actions clearfix'>
|
||||
<?php echo "<div class='btn-group'>" . html::selectAll() . html::selectReverse() . '</div>' . html::submitButton("<i class='icon-edit'></i> " . $lang->edit);?>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
// echo "<li id='account'>" . html::select('account', $users, $account, "onchange=changeUser(this.value,$projectID)") . '</li>';
|
||||
|
||||
echo "<li id='account' class='dropdown'>";
|
||||
$current = $users[isset($account) ? $account : ''];
|
||||
$current = zget($users, isset($account) ? $account : '', '');
|
||||
if(empty($current)) $current = $lang->project->byUser;
|
||||
echo html::a('javascript:;', $current . " <span class='caret'></span>", '', "data-toggle='dropdown'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
|
||||
@@ -377,7 +377,7 @@ class story extends control
|
||||
$this->view->productID = $productID;
|
||||
$this->view->storyIDList = $storyIDList;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->productName = $product->name;
|
||||
$this->view->productName = isset($product) ? $product->name : '';
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['story']);?></span>
|
||||
<strong><small class='text-muted'><?php echo html::icon($lang->icons['batchEdit']);?></small> <?php echo $lang->story->common . $lang->colon . $lang->story->batchEdit;?></strong>
|
||||
<?php if($productName):?>
|
||||
<small class='text-muted'><?php echo html::icon($lang->icons['product']) . ' ' . $lang->story->product . $lang->colon . ' ' . $productName;?></small>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<form class='form-condensed' method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "from=storyBatchEdit")?>">
|
||||
|
||||
@@ -343,7 +343,7 @@ class task extends control
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->taskIDList = $taskIDList;
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->projectName = $project->name;
|
||||
$this->view->projectName = isset($project) ? $project->name : '';
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['task']);?></span>
|
||||
<strong><small class='text-muted'><?php echo html::icon($lang->icons['batchEdit']);?></small> <?php echo $lang->task->common . $lang->colon . $lang->task->batchEdit;?></strong>
|
||||
<?php if($projectName):?>
|
||||
<small class='text-muted'><?php echo html::icon($lang->icons['project']) . ' ' . $lang->task->project . $lang->colon . ' ' . $projectName;?></small>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@ class todoModel extends model
|
||||
/* Initialize todos from the post data. */
|
||||
foreach($todoIDList as $todoID)
|
||||
{
|
||||
$todo = new stdclass();
|
||||
$todo->date = $this->post->dates[$todoID];
|
||||
$todo->type = $this->post->types[$todoID];
|
||||
$todo->pri = $this->post->pris[$todoID];
|
||||
@@ -157,7 +158,6 @@ class todoModel extends model
|
||||
if($todo->type == 'bug') $todo->idvalue = isset($this->post->bugs[$todoID]) ? $this->post->bugs[$todoID] : 0;
|
||||
|
||||
$todos[$todoID] = $todo;
|
||||
unset($todo);
|
||||
}
|
||||
|
||||
foreach($todos as $todoID => $todo)
|
||||
|
||||
Reference in New Issue
Block a user