Don't markdown project owner's name in tooltip
This commit is contained in:
committed by
Frédéric Guillot
parent
e8df859da2
commit
9c50fc9eb5
@@ -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>';
|
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)
|
public function tooltipLink($label, $link)
|
||||||
{
|
{
|
||||||
return '<span class="tooltip" data-href="'.$link.'">'.$label.'</span>';
|
return '<span class="tooltip" data-href="'.$link.'">'.$label.'</span>';
|
||||||
|
|||||||
@@ -67,14 +67,14 @@ class ProjectHeaderHelper extends Base
|
|||||||
public function getDescription(array &$project)
|
public function getDescription(array &$project)
|
||||||
{
|
{
|
||||||
if ($project['owner_id'] > 0) {
|
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'])) {
|
if (! empty($project['description'])) {
|
||||||
$description .= '***'.PHP_EOL.PHP_EOL;
|
$description .= '<hr>'.PHP_EOL.PHP_EOL;
|
||||||
$description .= $project['description'];
|
$description .= $this->helper->text->markdown($project['description']);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$description = $project['description'];
|
$description = $this->helper->text->markdown($project['description']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $description;
|
return $description;
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</span>
|
</span>
|
||||||
<?php if (! empty($description)): ?>
|
<?php if (! empty($description)): ?>
|
||||||
<?= $this->app->tooltipMarkdown($description) ?>
|
<?= $this->app->tooltipHTML($description) ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
Reference in New Issue
Block a user