pluginOutput: make use of new styles

This commit is contained in:
Thomas Gelf 2015-11-06 01:56:17 +01:00
parent 5bf107f853
commit f2bc3368e7
2 changed files with 13 additions and 8 deletions

View File

@ -40,6 +40,7 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
'<table style="font-size: 0.75em"', '<table style="font-size: 0.75em"',
$this->getPurifier()->purify($output) $this->getPurifier()->purify($output)
); );
$isHtml = true;
} else { } else {
// Plaintext // Plaintext
$output = preg_replace( $output = preg_replace(
@ -47,11 +48,17 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
self::$txtReplacements, self::$txtReplacements,
$this->view->escape($output) $this->view->escape($output)
); );
} $isHtml = false;
if (! $raw) {
$output = '<blockquote>' . $output . '</blockquote>';
} }
$output = $this->fixLinks($output); $output = $this->fixLinks($output);
if (! $raw) {
if ($isHtml) {
$output = '<div class="pluginoutput">' . $output . '</div>';
} else {
$output = '<div class="pluginoutput preformatted">' . $output . '</div>';
}
}
return $output; return $output;
} }

View File

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