From a973fee912890d563a545570c31d63459740479b Mon Sep 17 00:00:00 2001 From: gravel Date: Wed, 12 Apr 2023 18:57:18 +0200 Subject: [PATCH] Update column labels & tooltips --- sites/+components/tbl_communities.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sites/+components/tbl_communities.php b/sites/+components/tbl_communities.php index a56bb02..ae335ca 100644 --- a/sites/+components/tbl_communities.php +++ b/sites/+components/tbl_communities.php @@ -10,21 +10,24 @@ function sort_onclick($colno) { global $TABLE_COLUMNS; $column = $TABLE_COLUMNS[$colno]; - if (!column_sortable($column['id'])) return ""; - $name = $column['name']; + $name = isset($column['name_long']) ? $column['name_long'] : $column['name']; + if (!column_sortable($column['id'])) return " title='Column: $name'"; return " title='Click to sort by $name'"; } + // Note: Changing the names displayed requires updating + // the --expanded-static-column-width and --collapsed-static-column-width CSS variables. + $TABLE_COLUMNS = [ - ['id' => "identifier", 'name' => "Identifier"], - ['id' => "language", 'name' => "L"], + ['id' => "identifier", 'name' => "Identifier", 'name_long' => "Room identifier"], + ['id' => "language", 'name' => "L", 'name_long' => "Language"], ['id' => "name", 'name' => "Name"], - ['id' => "description", 'name' => "Description"], - ['id' => "users", 'name' => "Users"], + ['id' => "description", 'name' => "About", 'name_long' => "Description"], + ['id' => "users", 'name' => "#", 'name_long' => "Weekly Active Users"], ['id' => "preview", 'name' => "Preview"], ['id' => "qr_code", 'name' => "QR"], - ['id' => "server_icon", 'name' => "Host"], - ['id' => "join_url", 'name' => "URL"], + ['id' => "server_icon", 'name' => "Host", 'name_long' => "Server host"], + ['id' => "join_url", 'name' => "URL", 'name_long' => "In-app Join URL"], ]; ?>