]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Channel list: show the modes but not the parameters. Like /LIST basically.
authorBram Matthys <redacted>
Sun, 16 Apr 2023 16:48:31 +0000 (18:48 +0200)
committerBram Matthys <redacted>
Sun, 16 Apr 2023 16:50:46 +0000 (18:50 +0200)
(You still see the parameters on hover, though)

channels/index.php

index af8637c89fd0fd83205ade07de3e00056ef4687a..1ca4c6276d9c4d18aadaa3802680d59a52d63cc7 100644 (file)
@@ -34,14 +34,16 @@ $channels = $rpc->channel()->getAll();
                        echo "<td><a href=\"details.php?chan=".urlencode(htmlspecialchars($channel->name))."\">".htmlspecialchars($channel->name)."</a></td>";
                        $s = ($channel->num_users) ? "success" : "danger";
                        echo "<td><span class=\"badge rounded-pill badge-$s\">".$channel->num_users."</span></td>";
-                       $modes = (isset($channel->modes)) ? "+" . $channel->modes : "<none>";
-                       echo "<td class=\"modescol\">".htmlspecialchars($modes)."</td>";
+                       $modes = (isset($channel->modes)) ? "+" . explode(" ",$channel->modes)[0] : "<none>";
+                       echo "<td class=\"modescol\">".
+                            "<span data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"+".htmlspecialchars($channel->modes)."\">".
+                            htmlspecialchars($modes)."</span></td>";
                        $topic = (isset($channel->topic)) ? htmlspecialchars($channel->topic) : "";
                        echo "<td class=\"topiccol\" style=\"overflow:hidden;\">".$topic."</td>";
                        $date = explode("T", $channel->creation_time)[0];
                        echo "<td class=\"createdcol\" style=\"white-space:nowrap\">".
                             "<span data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"".$channel->creation_time."\">".
-                            "$date</td>";
+                            "$date</span></td>";
                        echo "</tr>";
                }