Don't markdown project owner's name in tooltip

This commit is contained in:
Andrew Engelbrecht 2018-04-28 21:14:05 -04:00 committed by Frédéric Guillot
parent e8df859da2
commit 9c50fc9eb5
3 changed files with 10 additions and 5 deletions

View File

@ -17,6 +17,11 @@ class AppHelper extends Base
return '<span class="tooltip"><i class="fa '.$icon.'"></i><script type="text/template"><div class="markdown">'.$this->helper->text->markdown($markdownText).'</div></script></span>';
}
public function tooltipHTML($htmlText, $icon = 'fa-info-circle')
{
return '<span class="tooltip"><i class="fa '.$icon.'"></i><script type="text/template"><div class="markdown">'.$htmlText.'</div></script></span>';
}
public function tooltipLink($label, $link)
{
return '<span class="tooltip" data-href="'.$link.'">'.$label.'</span>';

View File

@ -67,14 +67,14 @@ class ProjectHeaderHelper extends Base
public function getDescription(array &$project)
{
if ($project['owner_id'] > 0) {
$description = t('Project owner: ').'**'.$this->helper->text->e($project['owner_name'] ?: $project['owner_username']).'**'.PHP_EOL.PHP_EOL;
$description = t('Project owner: ').'<strong>'.$this->helper->text->e($project['owner_name'] ?: $project['owner_username']).'</strong>'.PHP_EOL.PHP_EOL;
if (! empty($project['description'])) {
$description .= '***'.PHP_EOL.PHP_EOL;
$description .= $project['description'];
$description .= '<hr>'.PHP_EOL.PHP_EOL;
$description .= $this->helper->text->markdown($project['description']);
}
} else {
$description = $project['description'];
$description = $this->helper->text->markdown($project['description']);
}
return $description;

View File

@ -10,6 +10,6 @@
<?php endif ?>
</span>
<?php if (! empty($description)): ?>
<?= $this->app->tooltipMarkdown($description) ?>
<?= $this->app->tooltipHTML($description) ?>
<?php endif ?>
</h1>