* finish task #2907,2910.

This commit is contained in:
wangyidong
2017-03-06 13:14:38 +08:00
parent 54f267e438
commit f1515951b0
19 changed files with 426 additions and 144 deletions
+15 -4
View File
@@ -92,13 +92,24 @@
</tr>
</thead>
<?php
$stepId = $childId = 0;
foreach($case->steps as $stepID => $step)
{
$stepID += 1;
echo "<tr><th class='w-id text-center strong'>$stepID</th>";
echo "<td class='text-left'>" . nl2br($step->desc) . "</td>";
echo "<td class='text-left'>" . nl2br($step->expect) . "</td>";
$stepClass = "step-{$step->type}";
if($step->type == 'group' or ($step->type == 'item' and $step->parent == 0))
{
$stepId++;
$childId = 0;
}
if($step->type == 'item' and $step->parent == 0) $stepClass = 'step-group';
echo "<tr class='step {$stepClass}'>";
echo "<th class='step-id'>$stepId</th>";
echo "<td class='text-left'><div class='input-group'>";
if($step->type == 'item' and $step->parent != 0) echo "<span class='step-item-id'>{$stepId}.{$childId}</span>";
echo nl2br($step->desc) . "</td>";
echo "<td class='text-left'>" . nl2br($step->expect) . "</div></td>";
echo "</tr>";
$childId ++;
}
?>
</table>