diff --git a/sites/+components/tbl-communities.php b/sites/+components/tbl-communities.php index b55c06c..9db20f8 100644 --- a/sites/+components/tbl-communities.php +++ b/sites/+components/tbl-communities.php @@ -17,12 +17,11 @@ return $id != "qr_code" && $id != "preview" && $id != "join_url"; } - function sort_onclick($colno) { - global $TABLE_COLUMNS; - $column = $TABLE_COLUMNS[$colno]; + function sort_onclick($column) { $name = isset($column['name_long']) ? $column['name_long'] : $column['name']; - if (!column_sortable($column['id'])) return " title='$name'"; - return " title='Click to sort by $name.'"; + if (!column_sortable($column['id'])) return "title='$name'"; + $name = mb_strtolower($name); + return "title='Click to sort by $name.'"; } // Note: Changing the names or columns displayed requires updating @@ -33,7 +32,7 @@ ['id' => "name", 'name' => "Name"], ['id' => "description", 'name' => "About", 'name_long' => "Description"], ['id' => "users", 'name' => "#", 'name_long' => "Active Users"], - ['id' => "preview", 'name' => "Preview"], + ['id' => "preview", 'name' => "Preview", 'name_long' => "Preview (external link)"], ['id' => "qr_code", 'name' => "QR", 'name_long' => "QR Code (for use in-app)"], ['id' => "server_icon", 'name' => "Host", 'name_long' => "Server host"], ['id' => "join_url", 'name' => "URL", 'name_long' => "Join URL (for use in-app)"], @@ -42,8 +41,8 @@
id="th_=$column['id']?>" class="tbl_communities__th"> + + | id="th_=$column['id']?>" class="tbl_communities__th"> =$column['name']?> |
---|