From: Joshua Rüsweg Date: Tue, 1 Aug 2017 12:08:35 +0000 (+0200) Subject: Add showTooltip option for trophies X-Git-Tag: 3.1.0_Alpha_1~124 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c194c001cf8a9222b448b7e9f51fa88585d0b5da;p=GitHub%2FWoltLab%2FWCF.git Add showTooltip option for trophies See #2315 --- diff --git a/com.woltlab.wcf/templates/messageSidebar.tpl b/com.woltlab.wcf/templates/messageSidebar.tpl index f9ccc323b4..09603ed6d9 100644 --- a/com.woltlab.wcf/templates/messageSidebar.tpl +++ b/com.woltlab.wcf/templates/messageSidebar.tpl @@ -49,7 +49,7 @@
diff --git a/com.woltlab.wcf/templates/trophyBadge.tpl b/com.woltlab.wcf/templates/trophyBadge.tpl index 6e305d1240..884fa4fb8e 100644 --- a/com.woltlab.wcf/templates/trophyBadge.tpl +++ b/com.woltlab.wcf/templates/trophyBadge.tpl @@ -1,6 +1,6 @@ diff --git a/com.woltlab.wcf/templates/trophyImage.tpl b/com.woltlab.wcf/templates/trophyImage.tpl index 38bc00fccb..a5ca927d61 100644 --- a/com.woltlab.wcf/templates/trophyImage.tpl +++ b/com.woltlab.wcf/templates/trophyImage.tpl @@ -1,7 +1,7 @@ diff --git a/com.woltlab.wcf/templates/user.tpl b/com.woltlab.wcf/templates/user.tpl index 4d412e6896..b8e45fb4b3 100644 --- a/com.woltlab.wcf/templates/user.tpl +++ b/com.woltlab.wcf/templates/user.tpl @@ -176,7 +176,7 @@
diff --git a/com.woltlab.wcf/templates/userProfilePreview.tpl b/com.woltlab.wcf/templates/userProfilePreview.tpl index a115d09221..c71da8221f 100644 --- a/com.woltlab.wcf/templates/userProfilePreview.tpl +++ b/com.woltlab.wcf/templates/userProfilePreview.tpl @@ -15,7 +15,7 @@
diff --git a/wcfsetup/install/files/lib/data/trophy/Trophy.class.php b/wcfsetup/install/files/lib/data/trophy/Trophy.class.php index 27a6281f79..ac86bbf9da 100644 --- a/wcfsetup/install/files/lib/data/trophy/Trophy.class.php +++ b/wcfsetup/install/files/lib/data/trophy/Trophy.class.php @@ -72,14 +72,16 @@ class Trophy extends DatabaseObject implements ITitledLinkObject, IRouteControll * Renders a trophy. * * @param integer $size + * @param boolean $showTooltip * @return string */ - public function renderTrophy($size = self::DEFAULT_SIZE) { + public function renderTrophy($size = self::DEFAULT_SIZE, $showTooltip = false) { switch ($this->type) { case self::TYPE_IMAGE: { return WCF::getTPL()->fetch('trophyImage', 'wcf', [ 'size' => $size, - 'trophy' => $this + 'trophy' => $this, + 'showTooltip' => $showTooltip ], true); break; } @@ -87,14 +89,16 @@ class Trophy extends DatabaseObject implements ITitledLinkObject, IRouteControll case self::TYPE_BADGE: return WCF::getTPL()->fetch('trophyBadge', 'wcf', [ 'size' => $size, - 'trophy' => $this + 'trophy' => $this, + 'showTooltip' => $showTooltip ], true); break; default: $parameters = [ 'renderedTemplate' => null, - 'size' => $size + 'size' => $size, + 'showTooltip' => $showTooltip ]; EventHandler::getInstance()->fireAction($this, 'renderTrophy', $parameters);