Files
EasySoft-ZenTaoPMS/module/testcase/view/batchcreate.html.php
2016-04-13 11:35:04 +08:00

98 lines
5.8 KiB
PHP

<?php
/**
* The batch create view of testcase module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yangyang Shi <shiyangyang@cnezsoft.com>
* @package testcase
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('testcaseBatchCreateNum', $config->testcase->batchCreate);?>
<?php js::set('productID', $productID);?>
<?php js::set('branch', $branch);?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['testcase']);?></span>
<strong>
<small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small>
<?php echo $lang->testcase->batchCreate;?>
<?php if($this->session->currentProductType !== 'normal') echo '<span class="label label-info">' . $branches[$branch] . '</span>';?>
</strong>
<?php if($story):?>
<small class='text-muted'><?php echo html::icon($lang->icons['story']) . ' ' . $story->title ?></small>
<?php endif;?>
<div class='actions'>
<button type="button" class="btn btn-default" data-toggle="customModal"><i class='icon icon-cog'></i></button>
<?php echo html::commonButton($lang->pasteText, "data-toggle='myModal' ")?>
</div>
</div>
</div>
<?php
$hasFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field)$hasFields[$field] = '';
}
?>
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin'>
<table align='center' class='table table-form table-fixed'>
<thead>
<tr>
<th class='w-50px'><?php echo $lang->idAB;?></th>
<th class='w-200px<?php echo zget($hasFields, 'module', ' hidden')?>'><?php echo $lang->testcase->module;?></th>
<th class='w-200px<?php echo zget($hasFields, 'story', ' hidden')?>'><?php echo $lang->testcase->story;?></th>
<th><?php echo $lang->testcase->title;?> <span class='required'></span></th>
<th class='w-180px'><?php echo $lang->testcase->type;?> <span class='required'></span></th>
<th class='w-200px<?php echo zget($hasFields, 'precondition', ' hidden')?>'><?php echo $lang->testcase->precondition;?></th>
<th class='w-100px<?php echo zget($hasFields, 'keywords', ' hidden')?>'><?php echo $lang->testcase->keywords;?></th>
<th class='w-200px<?php echo zget($hasFields, 'stage', ' hidden')?>'><?php echo $lang->testcase->stage;?></th>
</tr>
</thead>
<?php unset($lang->testcase->typeList['']);?>
<?php for($i = 0; $i < $config->testcase->batchCreate; $i++):?>
<?php
if($i != 0) $currentModuleID = 'ditto';
if($i != 0) $lang->testcase->typeList['ditto'] = $lang->testcase->ditto;
$type = $i == 0 ? 'feature' : 'ditto';
$pri = 3;
?>
<tr class='text-center'>
<td><?php echo $i+1;?></td>
<td class='text-left<?php echo zget($hasFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $currentModuleID, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($hasFields, 'story', ' hidden')?>' style='overflow:visible'><?php echo html::select("story[$i]", $storyList, $story ? $story->id : '', 'class="form-control chosen"');?></td>
<td><?php echo html::input("title[$i]", '', "class='form-control'");?></td>
<td><?php echo html::select("type[$i]", $lang->testcase->typeList, $type, "class=form-control");?></td>
<td class='<?php echo zget($hasFields, 'precondition', 'hidden')?>'><?php echo html::textarea("precondition[$i]", '', "class='form-control'")?></td>
<td class='<?php echo zget($hasFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
<td class='text-left<?php echo zget($hasFields, 'stage', ' hidden')?>' style='overflow:visible'><?php echo html::select("stage[$i][]", $lang->testcase->stageList, '', "class='form-control chosen' multiple");?></td>
</tr>
<?php endfor;?>
<tfoot>
<tr><td colspan='<?php echo count($hasFields) + 3?>' class='text-center'><?php echo html::submitButton() . html::backButton();?></td></tr>
</tfoot>
</table>
</form>
<table class='hide' id='trTemp'>
<tbody>
<tr class='text-center'>
<td>%s</td>
<td class='text-left<?php echo zget($hasFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[%s]", $moduleOptionMenu, $currentModuleID, "class='form-control'");?></td>
<td class='text-left<?php echo zget($hasFields, 'story', ' hidden')?>' style='overflow:visible'><?php echo html::select("story[%s]", '', '', 'class="form-control"');?></td>
<td><?php echo html::input("title[%s]", '', "class='form-control'");?></td>
<td><?php echo html::select("type[%s]", $lang->testcase->typeList, $type, "class=form-control");?></td>
<td class='<?php echo zget($hasFields, 'precondition', 'hidden')?>'><?php echo html::textarea("precondition[%s]", '', "class='form-control'")?></td>
<td class='<?php echo zget($hasFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[%s]", '', "class='form-control'");?></td>
<td class='text-left<?php echo zget($hasFields, 'stage', ' hidden')?>' style='overflow:visible'><?php echo html::select("stage[%s][]", $lang->testcase->stageList, '', "class='form-control' multiple");?></td>
</tr>
</tbody>
</table>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustom', 'module=testcase&section=custom&key=batchcreate')?>
<?php include '../../common/view/customfield.html.php';?>
<?php include '../../common/view/pastetext.html.php';?>
<?php include '../../common/view/footer.html.php';?>