* rewrite batch create page.
This commit is contained in:
@@ -122,7 +122,7 @@ class task extends control
|
||||
}
|
||||
|
||||
$stories = $this->story->getProjectStoryPairs($projectID);
|
||||
$stories['same'] = $this->lang->task->same;
|
||||
$stories['ditto'] = $this->lang->task->ditto;
|
||||
$members = $this->project->getTeamMemberPairs($projectID, 'nodeleted');
|
||||
$header['title'] = $project->name . $this->lang->colon . $this->lang->task->create;
|
||||
$position[] = html::a($taskLink, $project->name);
|
||||
|
||||
@@ -75,8 +75,7 @@ $lang->task->lastEditedBy = 'Last Edited By';
|
||||
$lang->task->lastEditedDate = 'Last Edited Date';
|
||||
$lang->task->lastEdited = 'Last Edited';
|
||||
|
||||
$lang->task->same = 'The same as above';
|
||||
$lang->task->notes = '(Notes: the name, type, pri and estimate must be written, otherwise it is no use)';
|
||||
$lang->task->ditto = 'Ditto';
|
||||
|
||||
$lang->task->statusList[''] = '';
|
||||
$lang->task->statusList['wait'] = 'Pending';
|
||||
|
||||
@@ -75,8 +75,7 @@ $lang->task->lastEditedBy = '最后修改';
|
||||
$lang->task->lastEditedDate = '最后修改日期';
|
||||
$lang->task->lastEdited = '最后编辑';
|
||||
|
||||
$lang->task->same = '同上';
|
||||
$lang->task->notes = '(注:“任务类型”、“任务名称”、“优先级”和“预计工时”必需填写,否则此行无效)';
|
||||
$lang->task->ditto = '同上';
|
||||
|
||||
$lang->task->statusList[''] = '';
|
||||
$lang->task->statusList['wait'] = '未开始';
|
||||
|
||||
@@ -94,8 +94,8 @@ class taskModel extends model
|
||||
{
|
||||
if($tasks->type[$i] != '' and $tasks->name[$i] != '' and $tasks->pri[$i] != 0 and $tasks->estimate[$i] != '')
|
||||
{
|
||||
$data[$i]->story = $tasks->story[$i] != 'same' ? $tasks->story[$i] : ($i == 0 ? 0 : $data[$i-1]->story);
|
||||
$data[$i]->type = $tasks->type[$i] == 'same' ? ($i == 0 ? '' : $data[$i-1]->type) : $tasks->type[$i];
|
||||
$data[$i]->story = $tasks->story[$i] != 'ditto' ? $tasks->story[$i] : ($i == 0 ? 0 : $data[$i-1]->story);
|
||||
$data[$i]->type = $tasks->type[$i] == 'ditto' ? ($i == 0 ? '' : $data[$i-1]->type) : $tasks->type[$i];
|
||||
$data[$i]->name = $tasks->name[$i];
|
||||
$data[$i]->desc = $tasks->desc[$i];
|
||||
$data[$i]->assignedTo = $tasks->assignedTo[$i];
|
||||
|
||||
@@ -19,35 +19,30 @@
|
||||
<tr>
|
||||
<th class='w-20px'><?php echo $lang->idAB;?></th>
|
||||
<th><?php echo $lang->task->story;?></th>
|
||||
<th class='w-300px'><?php echo $lang->task->name;?></th>
|
||||
<th class='red'><?php echo $lang->task->name;?></th>
|
||||
<th class='w-60px red'><?php echo $lang->typeAB;?></th>
|
||||
<th class='w-80px red'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='w-50px red'><?php echo $lang->task->estimateAB;?></th>
|
||||
<th class='w-200px'><?php echo $lang->task->desc;?></th>
|
||||
<th class='w-60px'><?php echo $lang->typeAB;?></th>
|
||||
<th class='w-100px'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='w-50px'><?php echo $lang->task->pri;?></th>
|
||||
<th class='w-60px'><?php echo $lang->task->estimate;?></th>
|
||||
</tr>
|
||||
<?php for($i = 0; $i < $config->task->batchCreate; $i++):?>
|
||||
<?php $story = $i == 0 ? '' : 'same';?>
|
||||
<?php $lang->task->typeList['same'] = $lang->task->same; $type = $i == 0 ? '' : 'same';?>
|
||||
<?php $story = $i == 0 ? '' : 'ditto';?>
|
||||
<?php $lang->task->typeList['ditto'] = $lang->task->ditto; $type = $i == 0 ? '' : 'ditto';?>
|
||||
|
||||
<?php $pri = 3;?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td class='a-left' style='overflow:visible'><?php echo html::select("story[$i]", $stories, $story, "class='select-1'");?></td>
|
||||
<td><?php echo html::input("name[$i]", '', 'class=text-1'); echo "<span class='star'>*</span>";?></td>
|
||||
<td><?php echo html::textarea("desc[$i]", '', "class=text-1 rows='1'");?></td>
|
||||
<td><?php echo html::select("type[$i]", $lang->task->typeList, $type, 'class=select-1'); echo "<span class='star'>*</span>";?></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("assignedTo[$i]", $members, '', 'class=select-1');?></td>
|
||||
<td><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=select-1'); echo "<span class='star'>*</span>";?></td>
|
||||
<td><?php echo html::input("estimate[$i]", '', 'class=text-1'); echo "<span class='star'>*</span>";?></td>
|
||||
<td><?php echo html::input("estimate[$i]", '', 'class=text-1');?></td>
|
||||
<td><?php echo html::textarea("desc[$i]", '', "class=text-1 rows='1'");?></td>
|
||||
<td><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=select-1');?></td>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
<tr>
|
||||
<td colspan='8'>
|
||||
<div class='half-left red'><?php echo $lang->task->notes;?></div>
|
||||
<div class='half-right'><?php echo html::submitButton() . html::resetButton();?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan='8' class='a-center'><?php echo html::submitButton() . html::resetButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user