* code for task#1782.

This commit is contained in:
xia0ta0
2014-02-28 15:01:04 +08:00
parent a5a87935b9
commit 4aa7220b74
3 changed files with 10 additions and 3 deletions
+2
View File
@@ -163,6 +163,7 @@ class task extends control
$stories = $this->story->getProjectStoryPairs($projectID);
$members = $this->project->getTeamMemberPairs($projectID, 'nodeleted');
$modules = $this->loadModel('tree')->getTaskOptionMenu($projectID);
$title = $project->name . $this->lang->colon . $this->lang->task->batchCreate;
$position[] = html::a($taskLink, $project->name);
$position[] = $this->lang->task->common;
@@ -172,6 +173,7 @@ class task extends control
$this->view->position = $position;
$this->view->project = $project;
$this->view->stories = $stories;
$this->view->modules = $modules;
$this->view->storyID = $storyID;
$this->view->members = $members;
$this->display();
+3 -2
View File
@@ -107,8 +107,9 @@ class taskModel extends model
if(empty($tasks->name[$i])) continue;
$data[$i] = new stdclass();
$data[$i]->story = $tasks->story[$i] == 'ditto' ? (isset($data[$i-1]) ? $data[$i-1]->story : 0) : ($tasks->story[$i] ? $tasks->story[$i] : 0);
$data[$i]->type = $tasks->type[$i] == 'ditto' ? (isset($data[$i-1]) ? $data[$i-1]->type : 0) : $tasks->type[$i];
$data[$i]->story = $tasks->story[$i] == 'ditto' ? (isset($data[$i-1]) ? $data[$i-1]->story : 0) : ($tasks->story[$i] ? $tasks->story[$i] : 0);
$data[$i]->type = $tasks->type[$i] == 'ditto' ? (isset($data[$i-1]) ? $data[$i-1]->type : 0) : $tasks->type[$i];
$data[$i]->module = $tasks->module[$i] == 'ditto' ? (isset($data[$i-1]) ? $data[$i-1]->module : 0) : $tasks->module[$i];
$data[$i]->assignedTo = $tasks->assignedTo[$i] == 'ditto' ? (isset($data[$i-1]) ? $data[$i-1]->assignedTo : 0) : $tasks->assignedTo[$i];
$data[$i]->name = htmlspecialchars($tasks->name[$i]);
$data[$i]->desc = str_replace(array("\r\n", "\n"), '<br />', htmlspecialchars($tasks->desc[$i]));
+5 -1
View File
@@ -21,6 +21,7 @@
<th><?php echo $lang->task->story;?></th>
<th class='red'><?php echo $lang->task->name;?></th>
<th class='w-60px red'><?php echo $lang->typeAB;?></th>
<th class='w-80px'><?php echo $lang->task->module?></th>
<th class='w-80px'><?php echo $lang->task->assignedTo;?></th>
<th class='w-50px'><?php echo $lang->task->estimateAB;?></th>
<th class='w-200px'><?php echo $lang->task->desc;?></th>
@@ -31,6 +32,7 @@
$stories['ditto'] = $this->lang->task->ditto;
$lang->task->typeList['ditto'] = $lang->task->ditto;
$members['ditto'] = $lang->task->ditto;
$modules['ditto'] = $lang->task->ditto;
?>
<?php for($i = 0; $i < $config->task->batchCreate; $i++):?>
<?php
@@ -39,10 +41,11 @@
$story = $storyID;
$type = '';
$member = '';
$module = '';
}
else
{
$story = $type = $member = 'ditto';
$story = $type = $member = $module = 'ditto';
}
?>
<?php $pri = 3;?>
@@ -56,6 +59,7 @@
</td>
<td><?php echo html::input("name[$i]", '', 'class=text-1');?></td>
<td><?php echo html::select("type[$i]", $lang->task->typeList, $type, 'class=select-1');?></td>
<td><?php echo html::select("modules[$i]", $modules, $module, 'class=select-1')?></td>
<td><?php echo html::select("assignedTo[$i]", $members, $member, 'class=select-1');?></td>
<td><?php echo html::input("estimate[$i]", '', 'class=text-1');?></td>
<td><?php echo html::textarea("desc[$i]", '', "rows='1' class=text-1");?></td>