* finish task 2090.

This commit is contained in:
ChuJilu
2014-10-24 09:14:59 +08:00
parent 447af821e7
commit bddc5a2991
3 changed files with 11 additions and 4 deletions
+4 -1
View File
@@ -224,7 +224,9 @@ class story extends control
$moduleOptionMenu['same'] = $this->lang->story->same;
$plans = $this->loadModel('productplan')->getPairs($productID, 'unexpired');
$plans['same'] = $this->lang->story->same;
$plans['same'] = $this->lang->story->same;
$priList = (array)$this->lang->story->priList;
$priList['same'] = $this->lang->story->same;
$this->view->title = $product->name . $this->lang->colon . $this->lang->story->batchCreate;
$this->view->productName = $product->name;
@@ -235,6 +237,7 @@ class story extends control
$this->view->moduleID = $moduleID;
$this->view->moduleOptionMenu = $moduleOptionMenu;
$this->view->plans = $plans;
$this->view->priList = $priList;
$this->view->planID = $planID;
$this->view->pri = $pri;
$this->view->productID = $productID;
+3
View File
@@ -219,12 +219,15 @@ class storyModel extends model
$module = 0;
$plan = 0;
$pri = 0;
for($i = 0; $i < $batchNum; $i++)
{
$module = $stories->module[$i] == 'same' ? $module : $stories->module[$i];
$plan = $stories->plan[$i] == 'same' ? $plan : $stories->plan[$i];
$pri = $stories->pri[$i] == 'same' ? $pri : $stories->pri[$i];
$stories->module[$i] = (int)$module;
$stories->plan[$i] = (int)$plan;
$stories->pri[$i] = (int)$pri;
}
for($i = 0; $i < $batchNum; $i++)
+4 -3
View File
@@ -27,7 +27,7 @@
<th class='w-p15'><?php echo $lang->story->plan;?></th>
<th><?php echo $lang->story->title;?> <span class='required'></span></th>
<th class='w-p20'><?php echo $lang->story->spec;?></th>
<th class='w-70px'><?php echo $lang->story->pri;?></th>
<th class='w-80px'><?php echo $lang->story->pri;?></th>
<th class='w-80px'><?php echo $lang->story->estimate;?></th>
<th class='w-70px'><?php echo $lang->story->review;?></th>
</tr>
@@ -35,6 +35,7 @@
<?php for($i = 0; $i < $config->story->batchCreate; $i++):?>
<?php $moduleID = $i == 0 ? $moduleID : 'same';?>
<?php $planID = $i == 0 ? '' : 'same';?>
<?php $pri = $i == 0 ? '' : 'same';?>
<tr class='text-center'>
<td><?php echo $i+1;?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
@@ -43,7 +44,7 @@
<td>
<?php echo html::textarea("spec[$i]", $spec, "rows='1' class='form-control'");?>
</td>
<td><?php echo html::select("pri[$i]", (array)$lang->story->priList, $pri, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("pri[$i]", $priList, $pri, "class='form-control'");?></td>
<td><?php echo html::input("estimate[$i]", $estimate, "class='form-control'");?></td>
<td><?php echo html::select("needReview[$i]", $lang->story->reviewList, 0, "class='form-control'");?></td>
</tr>
@@ -61,7 +62,7 @@
<td>
<?php echo html::textarea("spec[%s]", $spec, "rows='1' class='form-control'");?>
</td>
<td><?php echo html::select("pri[%s]", (array)$lang->story->priList, $pri, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("pri[%s]", $priList, $pri, "class='form-control'");?></td>
<td><?php echo html::input("estimate[%s]", $estimate, "class='form-control'");?></td>
<td><?php echo html::select("needReview[%s]", $lang->story->reviewList, 0, "class='form-control'");?></td>
</tr>