Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -1367,15 +1367,16 @@ class gitlabModel extends model
|
||||
$value = '';
|
||||
list($gitlabField, $optionType, $options) = explode('|', $config);
|
||||
if(!isset($changes->$gitlabField) and $object->id != 0) continue;
|
||||
if($optionType == 'field') $value = $issue->$gitlabField;
|
||||
if($optionType == 'fields') $value = $issue->$gitlabField; // TODO(dingguodong) not implemented.
|
||||
if($optionType == 'field' or $optionType == 'fields') $value = $issue->$gitlabField;
|
||||
if($options == 'date') $value = $value ? date('Y-m-d', strtotime($value)) : '0000-00-00';
|
||||
if($options == 'datetime') $value = $value ? date('Y-m-d H:i:s', strtotime($value)) : '0000-00-00 00:00:00';
|
||||
if($optionType == 'userPairs' and isset($issue->$gitlabField)) $value = zget($gitlabUsers, $issue->$gitlabField);
|
||||
if($optionType == 'configItems' and isset($issue->$gitlabField)) $value = array_search($issue->$gitlabField, $this->config->gitlab->$options);
|
||||
if($value) $object->$zentaoField = $value;
|
||||
|
||||
if($gitlabField == "description") $object->$zentaoField .= "<br>" . $issue->web_url;
|
||||
/* Execute this line even `$value == ""`, such as `$issue->description == ""`. */
|
||||
if($value or $value == "") $object->$zentaoField = $value;
|
||||
|
||||
if($gitlabField == "description") $object->$zentaoField .= "<br><br><a href=\"{$issue->web_url}\" target=\"_blank\">{$issue->web_url}</a>";
|
||||
}
|
||||
return $object;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->parentBudget . zget($lang->project->currencySymbol, $parentProgram->budgetUnit) . $budgetLeft : '';?>
|
||||
<?php echo html::input('budget', '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . $placeholder);?>
|
||||
<?php echo html::input('budget', '', "class='form-control' maxlength='10' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . $placeholder);?>
|
||||
<?php if($parentProgram):?>
|
||||
<span class='input-group-addon fix-border'><?php echo zget($budgetUnitList, $parentProgram->budgetUnit);?></span>
|
||||
<?php else:?>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->parentBudget . zget($lang->project->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
|
||||
<?php echo html::input('budget', $program->budget != 0 ? $program->budget : '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . ($program->budget == 0 ? 'disabled ' : '') . $placeholder);?>
|
||||
<?php echo html::input('budget', $program->budget != 0 ? $program->budget : '', "class='form-control' maxlength='10' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . ($program->budget == 0 ? 'disabled ' : '') . $placeholder);?>
|
||||
<?php if($parentProgram):?>
|
||||
<span class='input-group-addon'><?php echo zget($budgetUnitList, $program->budgetUnit);?></span>
|
||||
<?php else:?>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->parentBudget . zget($lang->project->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
|
||||
<?php echo html::input('budget', '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . $placeholder);?>
|
||||
<?php echo html::input('budget', '', "class='form-control' maxlength='10' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . $placeholder);?>
|
||||
<?php if($parentProgram):?>
|
||||
<span class='input-group-addon'><?php echo zget($budgetUnitList, $parentProgram->budgetUnit);?></span>
|
||||
<?php else:?>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->project->parentBudget . zget($lang->project->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
|
||||
<?php echo html::input('budget', $project->budget != 0 ? $project->budget : '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . ($project->budget == 0 ? 'disabled ' : '') . $placeholder);?>
|
||||
<?php echo html::input('budget', $project->budget != 0 ? $project->budget : '', "class='form-control' maxlength='10' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . ($project->budget == 0 ? 'disabled ' : '') . $placeholder);?>
|
||||
<?php if($parentProgram):?>
|
||||
<span class='input-group-addon'><?php echo zget($budgetUnitList, $project->budgetUnit);?></span>
|
||||
<?php else:?>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user