Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -68,6 +68,7 @@ class router extends baseRouter
|
||||
}
|
||||
|
||||
$productCommon = $projectCommon = 0;
|
||||
if(!empty($this->config->isINT)) $projectCommon = 1;
|
||||
if($productProject)
|
||||
{
|
||||
$productProject = $productProject->value;
|
||||
|
||||
@@ -342,6 +342,12 @@ class actionModel extends model
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif(($actionName == 'opened' or $actionName == 'managed') and $objectType == 'project')
|
||||
{
|
||||
$linkedProducts = $this->dao->select('id,name')->from(TABLE_PRODUCT)->where('id')->in($action->extra)->fetchPairs('id', 'name');
|
||||
$action->extra = '';
|
||||
if($linkedProducts) $action->extra = sprintf($this->lang->project->action->extra, '<strong>' . join(', ', $linkedProducts) . '</strong>');
|
||||
}
|
||||
$action->history = isset($histories[$actionID]) ? $histories[$actionID] : array();
|
||||
|
||||
$actionName = strtolower($action->action);
|
||||
|
||||
@@ -384,7 +384,7 @@ $('#module' + moduleID).closest('li').addClass('active');
|
||||
<?php if($browseType == 'bysearch'):?>
|
||||
if($('#query li.active').size() == 0) $.toggleQueryBox(true);
|
||||
<?php endif;?>
|
||||
<?php if($useDatatable):?>
|
||||
<?php if(!empty($useDatatable)):?>
|
||||
$(function(){$('#bugForm').table();})
|
||||
<?php endif;?>
|
||||
<?php $this->app->loadConfig('qa', '', false);?>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-120px text-top'><?php echo $lang->custom->select;?></th>
|
||||
<?php $checkedKey = isset($config->custom->productProject) ? $config->custom->productProject : '0_0' ?>
|
||||
<?php $checkedKey = isset($config->custom->productProject) ? $config->custom->productProject : (empty($config->isINT) ? '0_0' : '0_1');?>
|
||||
<td>
|
||||
<?php foreach($lang->custom->productProject->relation as $key => $value):?>
|
||||
<p><label class="radio-inline"><input type="radio" name="productProject" value="<?php echo $key?>"<?php echo $key == $checkedKey ? " checked='checked'" : ''?> id="productProject<?php echo $key;?>"><?php echo $value;?></label></p>
|
||||
|
||||
@@ -1053,7 +1053,7 @@ class project extends control
|
||||
$this->project->updateProducts($projectID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('project', $projectID, 'opened');
|
||||
$this->loadModel('action')->create('project', $projectID, 'opened', '', join(',', $_POST['products']));
|
||||
|
||||
$planID = reset($_POST['plans']);
|
||||
if(!empty($planID))
|
||||
@@ -1711,7 +1711,7 @@ class project extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function manageProducts($projectID, $from='')
|
||||
public function manageProducts($projectID, $from = '')
|
||||
{
|
||||
/* use first project if projectID does not exist. */
|
||||
if(!isset($this->projects[$projectID])) $projectID = key($this->projects);
|
||||
@@ -1723,6 +1723,8 @@ class project extends control
|
||||
|
||||
$this->project->updateProducts($projectID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('project', $projectID, 'Managed', '', join(',', $_POST['products']));
|
||||
die(js::locate($browseProjectLink));
|
||||
}
|
||||
|
||||
|
||||
@@ -246,6 +246,11 @@ $lang->project->withweekend = 'incl. Weekend';
|
||||
$lang->project->interval = 'Intervals';
|
||||
$lang->project->fixFirstWithLeft = 'Modify the left';
|
||||
|
||||
$lang->project->action = new stdclass();
|
||||
$lang->project->action->opened = '$date, created by <strong>$actor</strong> .' . "\n";
|
||||
$lang->project->action->managed = '$date, managed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->project->action->extra = 'The related products are %s.';
|
||||
|
||||
/* 统计。*/
|
||||
$lang->project->charts = new stdclass();
|
||||
$lang->project->charts->burn = new stdclass();
|
||||
|
||||
@@ -246,6 +246,11 @@ $lang->project->withweekend = '显示周末';
|
||||
$lang->project->interval = '间隔';
|
||||
$lang->project->fixFirstWithLeft = '修改剩余工时';
|
||||
|
||||
$lang->project->action = new stdclass();
|
||||
$lang->project->action->opened = '$date, 由 <strong>$actor</strong> 创建。$extra' . "\n";
|
||||
$lang->project->action->managed = '$date, 由 <strong>$actor</strong> 维护。$extra' . "\n";
|
||||
$lang->project->action->extra = '相关产品为 %s。';
|
||||
|
||||
/* 统计。*/
|
||||
$lang->project->charts = new stdclass();
|
||||
$lang->project->charts->burn = new stdclass();
|
||||
|
||||
@@ -15,15 +15,17 @@ $jsRoot = $this->app->getWebRoot() . "js/";
|
||||
include '../../common/view/datepicker.html.php';
|
||||
include '../../common/view/chosen.html.php';
|
||||
$formId = 'searchForm-' . uniqid('');
|
||||
$fieldWidth = $app->getClientLang() == 'en' ? 'w-130px' : 'w-110px';
|
||||
$operatorWidth = $app->getClientLang() == 'en' ? 'w-110px' : 'w-100px';
|
||||
?>
|
||||
<style>
|
||||
#selectPeriod {padding: 4px 0; height: 197px; min-width: 120px}
|
||||
#selectPeriod > .dropdown-header {background: #f1f1f1; display: block; text-align: center; padding: 4px 0; line-height: 20px; margin: 5px 10px; font-size: 14px; border-radius: 2px; color: #333; font-size: 12px}
|
||||
#groupAndOr {display: inline-block;}
|
||||
#<?php echo $formId;?> > table {margin: 0 auto;}
|
||||
#<?php echo $formId;?> > table > tbody > tr > td {padding: 10px 15px;}
|
||||
#<?php echo $formId;?> > table > tbody > tr > td {padding: 8px;}
|
||||
#<?php echo $formId;?> .form-actions {padding-bottom: 20px; padding-top: 0;}
|
||||
#<?php echo $formId;?> .chosen-container[id^="field"] .chosen-drop {min-width: 140px;}
|
||||
#<?php echo $formId;?> .chosen-container[id^="field"] .chosen-drop {min-width: 180px;}
|
||||
#<?php echo $formId;?> [id^="valueBox"] .chosen-container .chosen-single {min-width: 100px;}
|
||||
#<?php echo $formId;?> [id^="valueBox"] .chosen-container .chosen-drop {min-width: 300px;}
|
||||
#<?php echo $formId;?> .chosen-container .chosen-drop ul.chosen-results li {white-space:normal}
|
||||
@@ -91,16 +93,16 @@ foreach($fieldParams as $fieldName => $param)
|
||||
$param = $fieldParams[$currentField];
|
||||
|
||||
/* Print and or. */
|
||||
echo "<td class='text-right w-80px'>";
|
||||
echo "<td class='text-right w-70px'>";
|
||||
if($i == 1) echo "<span id='searchgroup1'><strong>{$lang->search->group1}</strong></span>" . html::hidden("andOr$fieldNO", 'AND');
|
||||
if($i > 1) echo html::select("andOr$fieldNO", $lang->search->andor, $formSession["andOr$fieldNO"], "class='form-control'");
|
||||
echo '</td>';
|
||||
|
||||
/* Print field. */
|
||||
echo "<td class='w-110px' style='overflow: visible'>" . html::select("field$fieldNO", $searchFields, $formSession["field$fieldNO"], "onchange='setField(this, $fieldNO, {$module}params)' class='form-control chosen'") . '</td>';
|
||||
echo "<td class='{$fieldWidth}' style='overflow: visible'>" . html::select("field$fieldNO", $searchFields, $formSession["field$fieldNO"], "onchange='setField(this, $fieldNO, {$module}params)' class='form-control chosen'") . '</td>';
|
||||
|
||||
/* Print operator. */
|
||||
echo "<td class='w-90px'>" . html::select("operator$fieldNO", $lang->search->operators, $formSession["operator$fieldNO"], "class='form-control'") . '</td>';
|
||||
echo "<td class='{$operatorWidth}'>" . html::select("operator$fieldNO", $lang->search->operators, $formSession["operator$fieldNO"], "class='form-control'") . '</td>';
|
||||
|
||||
/* Print value. */
|
||||
echo "<td id='valueBox$fieldNO' style='overflow:visible'>";
|
||||
@@ -129,7 +131,7 @@ foreach($fieldParams as $fieldName => $param)
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
<td class='text-center nobr w-90px'><?php echo html::select('groupAndOr', $lang->search->andor, $formSession['groupAndOr'], "class='form-control'")?></td>
|
||||
<td class='text-center nobr w-80px'><?php echo html::select('groupAndOr', $lang->search->andor, $formSession['groupAndOr'], "class='form-control'")?></td>
|
||||
<td class='w-400px'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
@@ -151,16 +153,16 @@ foreach($fieldParams as $fieldName => $param)
|
||||
$param = $fieldParams[$currentField];
|
||||
|
||||
/* Print and or. */
|
||||
echo "<td class='text-right w-80px'>";
|
||||
echo "<td class='text-right w-70px'>";
|
||||
if($i == 1) echo "<span id='searchgroup2'><strong>{$lang->search->group2}</strong></span>" . html::hidden("andOr$fieldNO", 'AND');
|
||||
if($i > 1) echo html::select("andOr$fieldNO", $lang->search->andor, $formSession["andOr$fieldNO"], "class='form-control'");
|
||||
echo '</td>';
|
||||
|
||||
/* Print field. */
|
||||
echo "<td class='w-110px' style='overflow: visible'>" . html::select("field$fieldNO", $searchFields, $formSession["field$fieldNO"], "onchange='setField(this, $fieldNO, {$module}params)' class='form-control chosen'") . '</td>';
|
||||
echo "<td class='{$fieldWidth}' style='overflow: visible'>" . html::select("field$fieldNO", $searchFields, $formSession["field$fieldNO"], "onchange='setField(this, $fieldNO, {$module}params)' class='form-control chosen'") . '</td>';
|
||||
|
||||
/* Print operator. */
|
||||
echo "<td class='w-90px'>" . html::select("operator$fieldNO", $lang->search->operators, $formSession["operator$fieldNO"], "class='form-control'") . '</td>';
|
||||
echo "<td class='{$operatorWidth}'>" . html::select("operator$fieldNO", $lang->search->operators, $formSession["operator$fieldNO"], "class='form-control'") . '</td>';
|
||||
|
||||
/* Print value. */
|
||||
echo "<td id='valueBox$fieldNO'>";
|
||||
|
||||
Reference in New Issue
Block a user