Skip to content

Commit

Permalink
pluginOutput: make use of new styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Gelf committed Nov 6, 2015
1 parent 5bf107f commit f2bc336
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
11 changes: 9 additions & 2 deletions modules/monitoring/application/views/helpers/PluginOutput.php
Expand Up @@ -40,18 +40,25 @@ public function pluginOutput($output, $raw = false)
'<table style="font-size: 0.75em"',
$this->getPurifier()->purify($output)
);
$isHtml = true;
} else {
// Plaintext
$output = preg_replace(
self::$txtPatterns,
self::$txtReplacements,
$this->view->escape($output)
);
$isHtml = false;
}
$output = $this->fixLinks($output);

if (! $raw) {
$output = '<blockquote>' . $output . '</blockquote>';
if ($isHtml) {
$output = '<div class="pluginoutput">' . $output . '</div>';
} else {
$output = '<div class="pluginoutput preformatted">' . $output . '</div>';
}
}
$output = $this->fixLinks($output);
return $output;
}

Expand Down
@@ -1,5 +1,3 @@
<div class="pluginoutput">
<h2><?= $this->translate('Plugin Output') ?></h2>
<?= $this->pluginOutput($object->output) ?>
<?= $this->pluginOutput($object->long_output) ?>
</div>
<h2><?= $this->translate('Plugin Output') ?></h2>
<?= $this->pluginOutput($object->output) ?>
<?= $this->pluginOutput($object->long_output) ?>

0 comments on commit f2bc336

Please sign in to comment.