summaryrefslogtreecommitdiff
path: root/app/Helper
diff options
context:
space:
mode:
Diffstat (limited to 'app/Helper')
-rw-r--r--app/Helper/AppHelper.php10
-rw-r--r--app/Helper/TextHelper.php12
2 files changed, 10 insertions, 12 deletions
diff --git a/app/Helper/AppHelper.php b/app/Helper/AppHelper.php
index 3a0a2428..63ebac98 100644
--- a/app/Helper/AppHelper.php
+++ b/app/Helper/AppHelper.php
@@ -12,6 +12,16 @@ use Kanboard\Core\Base;
*/
class AppHelper extends Base
{
+ public function tooltipMarkdown($markdownText, $icon = 'fa-info-circle')
+ {
+ 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 tooltipLink($label, $link)
+ {
+ return '<span class="tooltip" data-href="'.$link.'">'.$label.'</span>';
+ }
+
public function getToken()
{
return $this->token;
diff --git a/app/Helper/TextHelper.php b/app/Helper/TextHelper.php
index 698bef6d..910130d6 100644
--- a/app/Helper/TextHelper.php
+++ b/app/Helper/TextHelper.php
@@ -52,18 +52,6 @@ class TextHelper extends Base
}
/**
- * Escape Markdown text that need to be stored in HTML attribute
- *
- * @access public
- * @param string $text
- * @return mixed
- */
- public function markdownAttribute($text)
- {
- return htmlentities($this->markdown($text), ENT_QUOTES, 'UTF-8');
- }
-
- /**
* Format a file size
*
* @param integer $size Size in bytes