show/activitilog: make "disabled" visible

This commit is contained in:
Thomas Gelf 2016-02-23 03:19:33 +01:00
parent edd770a454
commit 93da0fe06c
1 changed files with 10 additions and 1 deletions

View File

@ -100,7 +100,16 @@ class ShowController extends ActionController
protected function showObject($object)
{
$this->view->output = '<pre>' . $this->view->escape(
$error = '';
if ($object->disabled === 'y') {
$error = '<p class="error">'
. $this->translate('This object will not be deployed as it has been disabled')
. '</p>';
}
$this->view->output = $error . ' <pre'
. ($object->disabled === 'y' ? ' class="disabled"' : '').
'>' . $this->view->escape(
(string) $object
) . '</pre>';
}