customvars.phtml: Collapse custom variables if they exceed 5 rows
Also collapses customvar values if they're JSON blobs and exceed 5 rows. refs #3566
This commit is contained in:
parent
f42a49d4a9
commit
226b58ac9d
|
@ -34,9 +34,11 @@ class Zend_View_Helper_Customvar extends Zend_View_Helper_Abstract
|
|||
return '[]';
|
||||
}
|
||||
$out = "<ul>\n";
|
||||
|
||||
foreach ($array as $val) {
|
||||
$out .= '<li>' . $this->customvar($val) . "</li>\n";
|
||||
}
|
||||
|
||||
return $out . "</ul>\n";
|
||||
}
|
||||
|
||||
|
@ -46,6 +48,7 @@ class Zend_View_Helper_Customvar extends Zend_View_Helper_Abstract
|
|||
return '{}';
|
||||
}
|
||||
$out = "{<ul>\n";
|
||||
|
||||
foreach ($object as $key => $val) {
|
||||
$out .= '<li>'
|
||||
. $this->view->escape($key)
|
||||
|
@ -53,6 +56,7 @@ class Zend_View_Helper_Customvar extends Zend_View_Helper_Abstract
|
|||
. $this->customvar($val)
|
||||
. "</li>\n";
|
||||
}
|
||||
|
||||
return $out . "</ul>}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
<?php if (! empty($object->customvars)): ?>
|
||||
<h2><?= $this->translate('Custom Variables') ?></h2>
|
||||
<table class="name-value-table">
|
||||
<table id="<?= $object->type ?>-customvars" class="name-value-table collapsible" data-visible-height="200">
|
||||
<tbody>
|
||||
<?= $this->render('show/components/customvars.phtml') ?>
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in New Issue