* ajusted views.

This commit is contained in:
Catouse
2014-04-15 17:35:20 +08:00
parent 23cbb7c9f3
commit 59e08a2c72
10 changed files with 167 additions and 140 deletions
+2
View File
@@ -2,3 +2,5 @@
.copy {display:block; margin-bottom:5px;}
.outer .row .col-md-8 .table-form {max-width: 600px}
#moduleBox span > .form-control {margin-bottom: 5px;}
+87 -80
View File
@@ -12,85 +12,92 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/treeview.html.php';?>
<table class='cont-lt5'>
<tr valign='top'>
<td class='side'>
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('tree', 'updateOrder', "root={$root->id}&viewType=task");?>'>
<table class='table-1'>
<caption><?php echo $title;?></caption>
<tr>
<td>
<div id='main'><?php echo $modules;?></div>
<div class='text-center'>
<?php if(common::hasPriv('tree', 'updateorder')) echo html::submitButton($lang->tree->updateOrder);?>
</div>
</td>
</tr>
</table>
</form>
</td>
<td class='divider'></td>
<td>
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('tree', 'manageChild', "root={$root->id}&viewType=task");?>'>
<table align='center' class='table-1'>
<div id='featurebar'>
<div class='heading'><i class='icon-cogs'></i> <?php echo $lang->tree->common;?> </div>
</div>
<div class='row'>
<div class='col-md-4 col-lg-3'>
<form class='form-condensed' method='post' target='hiddenwin' action='<?php echo $this->createLink('tree', 'updateOrder', "root={$root->id}&viewType=task");?>'>
<div class='panel'>
<div class='panel-heading'>
<i class='icon-cog'></i> <strong><?php echo $title;?></strong>
</div>
<div class='panel-body'>
<div id='main'><?php echo $modules;?></div>
<div class='text-center'>
<?php if(common::hasPriv('tree', 'updateorder')) echo html::submitButton($lang->tree->updateOrder);?>
</div>
</div>
</div>
</form>
</div>
<div class='col-md-8 col-lg-9'>
<form class='form-condensed' method='post' target='hiddenwin' action='<?php echo $this->createLink('tree', 'manageChild', "root={$root->id}&viewType=task");?>'>
<div class='panel'>
<div class='panel-heading'>
<i class='icon-sitemap'></i>
<?php $manageChild = 'manageTaskChild';?>
<caption><?php echo $lang->tree->$manageChild;?></caption>
<tr>
<td class='parentModule'>
<nobr>
<?php
echo html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&viewType=task"), $root->name);
echo $lang->arrow;
foreach($parentModules as $module)
{
echo html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&moduleID=$module->id"), $module->name);
echo $lang->arrow;
}
?>
</nobr>
</td>
<td id='moduleBox'>
<?php
$maxOrder = 0;
if($newModule and !$productID)
{
foreach($products as $id => $product)
{
echo '<span>' . html::input("products[id$id]", $product, 'class=text-3 style="margin-bottom:5px" disabled="true"') . '<br /></span>';
}
}
else
{
echo '<div id="sonModule">';
foreach($sons as $sonModule)
{
if($sonModule->order > $maxOrder) $maxOrder = $sonModule->order;
$disabled = $sonModule->type == 'task' ? '' : 'disabled="true"';
echo '<span>' . html::input("modules[id$sonModule->id]", $sonModule->name, 'class=text-3 style="margin-bottom:5px" ' . $disabled) . '<br /></span>';
}
for($i = 0; $i < TREE::NEW_CHILD_COUNT ; $i ++) echo '<span>' . html::input("modules[]", '', 'class=text-3 style="margin-bottom:5px"') . '<br /></span>';
}
?>
</div>
</td>
</tr>
<tr>
<td></td>
<td colspan='2'>
<?php
if(!$newModule or $productID)
{
echo html::submitButton() . html::backButton();
echo html::hidden('parentModuleID', $currentModuleID);
echo html::hidden('maxOrder', $maxOrder);
}
?>
<input type='hidden' value='<?php echo $currentModuleID;?>' name='parentModuleID' />
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?php echo $lang->tree->$manageChild;?>
</div>
<div class='panel-body'>
<table class='table table-form'>
<tr>
<td class='parentModule'>
<nobr>
<?php
echo html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&viewType=task"), $root->name);
echo $lang->arrow;
foreach($parentModules as $module)
{
echo html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&moduleID=$module->id"), $module->name);
echo $lang->arrow;
}
?>
</nobr>
</td>
<td id='moduleBox'>
<?php
$maxOrder = 0;
if($newModule and !$productID)
{
foreach($products as $id => $product)
{
echo '<span>' . html::input("products[id$id]", $product, 'class=form-control disabled="true"') . '</span>';
}
}
else
{
echo '<div id="sonModule">';
foreach($sons as $sonModule)
{
if($sonModule->order > $maxOrder) $maxOrder = $sonModule->order;
$disabled = $sonModule->type == 'task' ? '' : 'disabled="true"';
echo '<span>' . html::input("modules[id$sonModule->id]", $sonModule->name, 'class=form-control ' . $disabled) . '</span>';
}
for($i = 0; $i < TREE::NEW_CHILD_COUNT ; $i ++) echo '<span>' . html::input("modules[]", '', 'class=form-control') . '</span>';
}
?>
</div>
</td>
</tr>
<tr>
<td></td>
<td colspan='2'>
<?php
if(!$newModule or $productID)
{
echo html::submitButton() . html::backButton();
echo html::hidden('parentModuleID', $currentModuleID);
echo html::hidden('maxOrder', $maxOrder);
}
?>
<input type='hidden' value='<?php echo $currentModuleID;?>' name='parentModuleID' />
</td>
</tr>
</table>
</div>
</div>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+32 -25
View File
@@ -11,29 +11,36 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<form method='post' class='mt-10px' id='dataform'>
<table class='table-1'>
<caption><?php echo $lang->tree->edit;?></caption>
<?php $hidden = ($type != 'story' and $module->type == 'story');?>
<tr <?php if($hidden) echo "style='display:none'";?>>
<th><?php echo $lang->tree->parent;?></th>
<td><?php echo html::select('parent', $optionMenu, $module->parent, "class='form-control'");?></td>
</tr>
<tr <?php if($hidden) echo "style='display:none'";?>>
<th><?php echo $lang->tree->name;?></th>
<td><?php echo html::input('name', $module->name, "class='form-control'");?></td>
</tr>
<?php if($type == 'bug'):?>
<tr>
<th><?php echo $lang->tree->owner;?></th>
<td><?php echo html::select('owner', $users, $module->owner, "class='form-control'", true);?></td>
</tr>
<?php endif;?>
<tr>
<td colspan='2' class='text-center'>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
<div class='container mw-500px'>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['tree']);?></span>
<strong><small class='text-muted'><?php echo html::icon($lang->icons['edit']);?></small> <?php echo $lang->tree->edit;?></strong>
</div>
</div>
<form class='form-condensed' method='post' class='mt-10px' id='dataform'>
<table class='table table-form'>
<?php $hidden = ($type != 'story' and $module->type == 'story');?>
<tr <?php if($hidden) echo "style='display:none'";?>>
<th class='w-80px'><?php echo $lang->tree->parent;?></th>
<td><?php echo html::select('parent', $optionMenu, $module->parent, "class='form-control'");?></td>
</tr>
<tr <?php if($hidden) echo "style='display:none'";?>>
<th class='w-80px'><?php echo $lang->tree->name;?></th>
<td><?php echo html::input('name', $module->name, "class='form-control'");?></td>
</tr>
<?php if($type == 'bug'):?>
<tr>
<th class='w-80px'><?php echo $lang->tree->owner;?></th>
<td><?php echo html::select('owner', $users, $module->owner, "class='form-control'", true);?></td>
</tr>
<?php endif;?>
<tr>
<td colspan='2' class='text-center'>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.lite.html.php';?>