mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
Merge pull request #85 from dcramer/hide-empty-fields-in-maniphest
Hide auxiliary fields that have no value set
This commit is contained in:
commit
770beb5cd5
3 changed files with 7 additions and 3 deletions
|
@ -107,7 +107,7 @@ class ConduitAPI_differential_getcommitmessage_Method extends ConduitAPIMethod {
|
||||||
foreach ($aux_fields as $field_key => $field) {
|
foreach ($aux_fields as $field_key => $field) {
|
||||||
$value = $field->renderValueForCommitMessage($is_edit);
|
$value = $field->renderValueForCommitMessage($is_edit);
|
||||||
$label = $field->renderLabelForCommitMessage();
|
$label = $field->renderLabelForCommitMessage();
|
||||||
if ($value === null || !strlen($value)) {
|
if (!strlen($value)) {
|
||||||
if ($field_key === 'title') {
|
if ($field_key === 'title') {
|
||||||
$commit_message[] = '<<Enter Revision Title>>';
|
$commit_message[] = '<<Enter Revision Title>>';
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -53,7 +53,7 @@ final class DifferentialRevisionDetailView extends AphrontView {
|
||||||
$rows = array();
|
$rows = array();
|
||||||
foreach ($this->auxiliaryFields as $field) {
|
foreach ($this->auxiliaryFields as $field) {
|
||||||
$value = $field->renderValueForRevisionView();
|
$value = $field->renderValueForRevisionView();
|
||||||
if ($value !== null) {
|
if (strlen($value)) {
|
||||||
$label = $field->renderLabelForRevisionView();
|
$label = $field->renderLabelForRevisionView();
|
||||||
$rows[] =
|
$rows[] =
|
||||||
'<tr>'.
|
'<tr>'.
|
||||||
|
|
|
@ -147,7 +147,11 @@ class ManiphestTaskDetailController extends ManiphestController {
|
||||||
$aux_field->setValue($attribute->getValue());
|
$aux_field->setValue($attribute->getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
$dict[$aux_field->getLabel()] = $aux_field->renderForDetailView();
|
$value = $aux_field->renderForDetailView();
|
||||||
|
|
||||||
|
if (strlen($value)) {
|
||||||
|
$dict[$aux_field->getLabel()] = $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue