Change structure to enable .css for tooltip.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Fri, 27 Dec 2019 22:28:34 +0000 (22:28 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Fri, 27 Dec 2019 22:28:34 +0000 (22:28 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrreport/trunk@2896 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrreport_body.php

index 824307c2aecb16509617b4c796c22def83d905d5..34ac40d38736956bb18528f189659727e4f3bb77 100644 (file)
@@ -830,12 +830,10 @@ class WrReport {
                                if ($row->show_status) {
                                        $date_last_check = new DateTime($row->last_check);
                                        if ($date_last_check->diff($now)->days <= $wgWrReportIntermapsValidDays) {
                                if ($row->show_status) {
                                        $date_last_check = new DateTime($row->last_check);
                                        if ($date_last_check->diff($now)->days <= $wgWrReportIntermapsValidDays) {
-                                               if ($row->status == 'open') {
-                                                       $msg = wfMessage('wrreport-icon-intermaps-open', $row->last_update)->text();
-                                                       $td->appendElement('img', array('src' => '/vorlagen/s_open.png', 'alt' => $msg, 'title' => $msg));
-                                               } elseif ($row->status == 'closed') {
-                                                       $msg = wfMessage('wrreport-icon-intermaps-closed', $row->last_update)->text();
-                                                       $td->appendElement('img', array('src' => '/vorlagen/s_closed.png', 'alt' => $msg, 'title' => $msg));
+                                               if (in_array($row->status, ['open', 'closed'])) {
+                                                       $msg = wfMessage("wrreport-icon-intermaps-" . $row->status, $row->last_update)->text();
+                                                       $span = $td->appendElement('span', ['class' => 'tooltiproot', 'data-tooltip' => $msg]);
+                                                       $span->appendElement('img', array('src' => '/vorlagen/s_' . $row->status . '.png', 'alt' => $msg));
                                                }
                                        }
                                }
                                                }
                                        }
                                }