]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Fix some table views
authorValerie Pond <redacted>
Sun, 15 Jan 2023 19:44:55 +0000 (19:44 +0000)
committerValerie Pond <redacted>
Sun, 15 Jan 2023 19:44:55 +0000 (19:44 +0000)
Turns out our custom css wasn't fully included in the header due to paths.
Fixed that, fixed a couple of missing ```</tr>```s and fixed 'select all' checkbox on servers tab

channels/index.php
css/unrealircd-admin.css
header.php
js/unrealircd-admin.js
server_bans.php
users/index.php

index f7200837187e007f0ba916266876336303f228ec..d4318e9479adcda9d4b084d6826f280e42bcd75a 100644 (file)
@@ -14,7 +14,7 @@ $channels = $rpc->channel()->getAll();
 
 ?>
 <h4>Channels Overview</h4><br>
-<table class="container-xxl table-sm table-responsive caption-top table-striped">
+<table class="container-xxl table table-sm table-responsive caption-top table-striped">
        <thead class="table-primary">
        <th>Name</th>
        <th>Users</th>
@@ -34,6 +34,7 @@ $channels = $rpc->channel()->getAll();
                        $topic = (isset($channel->topic)) ? $channel->topic : "";
                        echo "<td>".$topic."</td>";
                        echo "<td>".$channel->creation_time."</td>";
+                       echo "</tr>";
                }
 
        require_once("../footer.php");
index 6fe7f51508fa2e725574c2886bff2a2fc521a2cd..d5fa9515fc2e7993e04def55f37bf37315417b99 100644 (file)
@@ -199,3 +199,8 @@ body {
 .table-striped>tbody>tr:nth-child(even)>th {
    background-color: #c9c9c949;
  }
+ .table-striped>tbody>tr:nth-child(odd)>td, 
+ .table-striped>tbody>tr:nth-child(odd)>th {
+       background-color: #ffffff;
+  }
+       
\ No newline at end of file
index 8f0b7a4bb31c687f790cce2cfb4fbe928c8a493f..364ba2584dce19a67bdc5fa7d2dac38c82adb09e 100644 (file)
@@ -18,7 +18,7 @@
 <script src="<?php echo BASE_URL; ?>js/unrealircd-admin.js"></script>
 <title>UnrealIRCd Panel</title>
 <link rel="icon" type="image/x-icon" href="<?php echo BASE_URL; ?>img/favicon.ico">
-<link href="<?php echo BASE_URL; ?>css/unrealircd-admin.css" rel="stylesheet">
+<link href="<?php echo UPATH; ?>css/unrealircd-admin.css" rel="stylesheet">
 </head>
 <body role="document">
 <div class="container-fluid">
index 47ffc1306b19038ddb0d791fd37d5d374bd3c6de..d920ff570b70f29b71ba42d13841b62102339b96 100644 (file)
@@ -33,6 +33,15 @@ function toggle_user(source) {
     }
 }
 
+
+/* TKL (un)select all checkbox */
+function toggle_server(source) {
+    checkboxes = document.getElementsByName("serverch[]");
+    for (var i = 0, n = checkboxes.length; i < n; i++) {
+        checkboxes[i].checked = source.checked;
+    }
+}
+
 /* TKL (un)select all checkbox */
 function toggle_sf(source) {
     checkboxes = document.getElementsByName("sf[]");
index cf78081db5139cc5def7e2a8288bd257ba309242..0834bd8f02e3324e4b9ace7e06b4acdce3d51eaa 100644 (file)
@@ -195,38 +195,39 @@ foreach ($rpc->serverbanexception()->getAll() as $v)
        </div>
        </div>
 
-       <table class="container-xxl table-sm table-responsive caption-top table-striped">
+       <table class="container-xxl table table-sm table-responsive caption-top table-striped">
        <thead class="table-primary">
        <form method="post">
-       <th><input type="checkbox" label='selectall' onClick="toggle_tkl(this)" /></th>
-       <th>Mask</th>
-       <th>Type</th>
-       <th>Duration</th>
-       <th>Reason</th>
-       <th>Set By</th>
-       <th>Set On</th>
-       <th>Expires</th>
+       <th scope="col"><input type="checkbox" label='selectall' onClick="toggle_tkl(this)" /></th>
+       <th scope="col">Mask</th>
+       <th scope="col">Type</th>
+       <th scope="col">Duration</th>
+       <th scope="col">Reason</th>
+       <th scope="col">Set By</th>
+       <th scope="col">Set On</th>
+       <th scope="col">Expires</th>
        </thead>
-       
+       <tbody>
        <?php
                foreach($tkl as $tkl)
                {
                        $set_in_config = ((isset($tkl->set_in_config) && $tkl->set_in_config) || ($tkl->set_by == "-config-")) ? true : false;
-                       echo "<tr>";
+                       echo "<tr scope='col'>";
                        if ($set_in_config)
-                               echo "<td></td>";
+                               echo "<td scope=\"col\"></td>";
                        else
-                               echo "<td><input type=\"checkbox\" value='" . base64_encode($tkl->name).",".base64_encode($tkl->type) . "' name=\"tklch[]\"></td>";
-                       echo "<td>".$tkl->name."</td>";
-                       echo "<td>".$tkl->type_string."</td>";
-                       echo "<td>".$tkl->duration_string."</td>";
-                       echo "<td>".$tkl->reason."</td>";
+                               echo "<td scope=\"col\"><input type=\"checkbox\" value='" . base64_encode($tkl->name).",".base64_encode($tkl->type) . "' name=\"tklch[]\"></td>";
+                       echo "<td scope=\"col\">".$tkl->name."</td>";
+                       echo "<td scope=\"col\">".$tkl->type_string."</td>";
+                       echo "<td scope=\"col\">".$tkl->duration_string."</td>";
+                       echo "<td scope=\"col\">".$tkl->reason."</td>";
                        $set_by = $set_in_config ? "<span class=\"badge rounded-pill badge-secondary\">Config</span>" : show_nick_only($tkl->set_by);
-                       echo "<td>".$set_by."</td>";
-                       echo "<td>".$tkl->set_at_string."</td>";
-                       echo "<td>".$tkl->expire_at_string."</td>";
+                       echo "<td scope=\"col\">".$set_by."</td>";
+                       echo "<td scope=\"col\">".$tkl->set_at_string."</td>";
+                       echo "<td scope=\"col\">".$tkl->expire_at_string."</td>";
+                       echo "</tr>";
                }
-       ?></table><p><button type="button" class="btn btn-danger" data-toggle="modal" data-target="#myModal2">
+       ?></tbody></table><p><button type="button" class="btn btn-danger" data-toggle="modal" data-target="#myModal2">
        Delete selected
        </button></p>
        <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="confirmModalCenterTitle" aria-hidden="true">
index 8e6501a0bc40a58b1c73b59127da22419c323141..075f6db8f7ddb4e2d879a950c5e3cc2847d0a24a 100644 (file)
@@ -147,6 +147,7 @@ Click on a username to view more information.
                        echo "<td>".$secure."</td>";
                        echo "<td>".$user->user->servername."</td>";
                        echo "<td>".$user->user->reputation."</td>";
+                       echo "</tr>";
                }
        ?>
        </tbody></table>