Merge branch 'zentaopms_9.8' of https://github.com/easysoft/zentaopms into zentaopms_9.8
This commit is contained in:
@@ -922,7 +922,6 @@ class commonModel extends model
|
||||
$queryCondition = $this->session->$queryCondition;
|
||||
$orderBy = $type . 'OrderBy';
|
||||
$orderBy = $this->session->$orderBy;
|
||||
$orderBy = str_replace('`left`', 'left', $orderBy); // process the `left` to left.
|
||||
|
||||
if(empty($queryCondition) or $this->session->$typeOnlyCondition)
|
||||
{
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::commonButton("<i class='icon-ok'></i> " . $lang->extension->installed, "disabled='disabled'", 'text-success');
|
||||
echo html::commonButton("<i class='icon-ok'></i> " . $lang->extension->installed, "disabled='disabled'", 'btn text-success');
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-date'> <?php common::printOrderLink('date', $orderBy, $vars, $lang->todo->date);?></th>
|
||||
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->todo->type);?></th>
|
||||
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<?php $style = $this->app->clientLang == 'en' ? "style='width:80px'" : '';?>
|
||||
<th class='w-pri' <?php echo $style;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th> <?php common::printOrderLink('name', $orderBy, $vars, $lang->todo->name);?></th>
|
||||
<th class='w-hour'> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->todo->beginAB);?></th>
|
||||
<th class='w-hour'> <?php common::printOrderLink('end', $orderBy, $vars, $lang->todo->endAB);?></th>
|
||||
|
||||
@@ -229,7 +229,8 @@ class product extends control
|
||||
die(js::locate($this->createLink($this->moduleName, 'browse', "productID=$productID"), 'parent'));
|
||||
}
|
||||
|
||||
$this->product->setMenu($this->products, key($this->products));
|
||||
$rootID = key($this->products);
|
||||
$this->product->setMenu($this->products, $rootID);
|
||||
|
||||
$this->view->title = $this->lang->product->create;
|
||||
$this->view->position[] = $this->view->title;
|
||||
@@ -238,6 +239,7 @@ class product extends control
|
||||
$this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst|noclosed');
|
||||
$this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst|noclosed');
|
||||
$this->view->lines = array('') + $this->loadModel('tree')->getLinePairs();
|
||||
$this->view->rootID = $rootID;
|
||||
|
||||
unset($this->lang->product->typeList['']);
|
||||
$this->display();
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Load product Lines.
|
||||
*
|
||||
* @param $rootID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadProductLines(rootID)
|
||||
{
|
||||
link = createLink('tree', 'ajaxGetOptionMenu', 'rootID=' + rootID + '&viewtype=line' + '&branch=0' + '&rootModuleID=0&returnType=html&fieldID=&needManage=true');
|
||||
$('#lineIdBox').load(link, function()
|
||||
{
|
||||
$(this).find('select').chosen(defaultChosenOptions)
|
||||
});
|
||||
}
|
||||
@@ -32,8 +32,18 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->line;?></th>
|
||||
<td><?php echo html::select('line', $lines, '', "class='form-control chosen'");?></td>
|
||||
<td><?php if(!$lines) common::printLink('tree', 'browse', "rootID=&view=line", $lang->tree->manageLine);?></td>
|
||||
<td>
|
||||
<div class='input-group' id='lineIdBox'>
|
||||
<?php
|
||||
echo html::select('line', $lines, '', "class='form-control chosen'");
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=line"), $lang->tree->manageLine, '_blank');
|
||||
echo ' ';
|
||||
echo html::a("javascript:loadProductLines({$rootID})", $lang->refresh);
|
||||
echo '</span>';
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->PO;?></th>
|
||||
|
||||
@@ -1462,7 +1462,7 @@ class story extends control
|
||||
foreach(explode(',', $story->plan) as $planID)
|
||||
{
|
||||
if(empty($planID)) continue;
|
||||
if(isset($relatedPlans[$planID]))$plans .= $relatedPlans[$planID] . "(#$planID) ";
|
||||
if(isset($relatedPlans[$planID]))$plans .= $relatedPlans[$planID] . "(#$planID)";
|
||||
}
|
||||
$story->plan = $plans;
|
||||
}
|
||||
|
||||
@@ -688,8 +688,8 @@ class testsuiteModel extends model
|
||||
if($stepData->type == 'step') $parentStepID = 0;
|
||||
}
|
||||
}
|
||||
$oldCase->steps = $this->joinStep($oldStep);
|
||||
$caseData->steps = $this->joinStep($steps);
|
||||
$oldCase->steps = $this->testcase->joinStep($oldStep);
|
||||
$caseData->steps = $this->testcase->joinStep($steps);
|
||||
$changes = common::createChanges($oldCase, $caseData);
|
||||
$actionID = $this->action->create('case', $caseID, 'Edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
@@ -24,10 +24,12 @@ class tree extends control
|
||||
*/
|
||||
public function browse($rootID, $viewType, $currentModuleID = 0, $branch = 0)
|
||||
{
|
||||
$this->loadModel('product');
|
||||
|
||||
/* According to the type, set the module root and modules. */
|
||||
if(strpos('story|bug|case|line', $viewType) !== false)
|
||||
if(strpos('story|bug|case', $viewType) !== false)
|
||||
{
|
||||
$product = $this->loadModel('product')->getById($rootID);
|
||||
$product = $this->product->getById($rootID);
|
||||
if(empty($product)) $this->locate($this->createLink('product', 'create'));
|
||||
if(!empty($product->type) && $product->type != 'normal')
|
||||
{
|
||||
@@ -350,13 +352,14 @@ class tree extends control
|
||||
$changeFunc = '';
|
||||
if($viewType == 'task' or $viewType == 'bug' or $viewType == 'case') $changeFunc = "onchange='loadModuleRelated()'";
|
||||
$field = $fieldID ? "modules[$fieldID]" : 'module';
|
||||
if($viewType == 'line') $field = 'line';
|
||||
$output = html::select("$field", $optionMenu, '', "class='form-control' $changeFunc");
|
||||
if(count($optionMenu) == 1 and $needManage)
|
||||
{
|
||||
$output .= "<span class='input-group-addon'>";
|
||||
$output .= html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=$viewType¤tModuleID=0&branch=$branch"), $this->lang->tree->manage, '_blank');
|
||||
$output .= ' ';
|
||||
$output .= html::a("javascript:loadProductModules($rootID)", $this->lang->refresh);
|
||||
$output .= $viewType == 'line' ? html::a("javascript:loadProductLines($rootID)", $this->lang->refresh) : html::a("javascript:loadProductModules($rootID)", $this->lang->refresh);
|
||||
$output .= '</span>';
|
||||
}
|
||||
die($output);
|
||||
|
||||
@@ -210,7 +210,7 @@ class userModel extends model
|
||||
if(strtolower($_POST['account']) == 'guest') return false;
|
||||
|
||||
$user = fixer::input('post')
|
||||
->setDefault('join', '0000-00-00')
|
||||
->setDefault('join', '0000-00-00' )
|
||||
->setIF($this->post->password1 != false, 'password', md5($this->post->password1))
|
||||
->setIF($this->post->password1 == false, 'password', '')
|
||||
->setIF($this->post->email != false, 'email', trim($this->post->email))
|
||||
|
||||
@@ -51,6 +51,10 @@
|
||||
<th><?php echo $lang->user->password2;?></th>
|
||||
<td><?php echo html::password('password2', '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->join;?></th>
|
||||
<td><?php echo html::input('join', date('Y-m-d'), "class='form-control form-date'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->role;?></th>
|
||||
<td><?php echo html::select('role', $lang->user->roleList, '', "class='form-control' onchange='changeGroup(this.value)'");?></td>
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
<th><?php echo $lang->user->role;?></th>
|
||||
<td><?php echo html::select('role', $lang->user->roleList, $user->role, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->join;?></th>
|
||||
<td><?php echo html::input('join', $user->join, "class='form-control form-date'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->group->priv;?></th>
|
||||
<td colspan='3'><?php echo html::select('groups[]', $groups, $userGroups, 'size=3 multiple=multiple class="form-control chosen"');?></td>
|
||||
|
||||
Reference in New Issue
Block a user