|
|
|
@ -9,15 +9,15 @@
|
|
|
|
|
// Once handlers are attached in JS, this check ceases to be useful.
|
|
|
|
|
function column_sortable($id) {
|
|
|
|
|
// Join URL contents are not guaranteed to have visible text.
|
|
|
|
|
return $id != "qr" && $id != "preview" && $id != "join_url";
|
|
|
|
|
return $id != "qr_code" && $id != "preview" && $id != "join_url";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function sort_onclick($colno) {
|
|
|
|
|
global $TABLE_COLUMNS;
|
|
|
|
|
$column = $TABLE_COLUMNS[$colno];
|
|
|
|
|
$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'";
|
|
|
|
|
if (!column_sortable($column['id'])) return " title='$name'";
|
|
|
|
|
return " title='Click to sort by $name'.";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Note: Changing the names displayed requires updating
|
|
|
|
@ -28,11 +28,11 @@
|
|
|
|
|
['id' => "language", 'name' => "L", 'name_long' => "Language"],
|
|
|
|
|
['id' => "name", 'name' => "Name"],
|
|
|
|
|
['id' => "description", 'name' => "About", 'name_long' => "Description"],
|
|
|
|
|
['id' => "users", 'name' => "#", 'name_long' => "Weekly Active Users"],
|
|
|
|
|
['id' => "users", 'name' => "#", 'name_long' => "Active Users"],
|
|
|
|
|
['id' => "preview", 'name' => "Preview"],
|
|
|
|
|
['id' => "qr_code", 'name' => "QR"],
|
|
|
|
|
['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' => "In-app Join URL"],
|
|
|
|
|
['id' => "join_url", 'name' => "URL", 'name_long' => "Join URL (for use in-app)"],
|
|
|
|
|
];
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
@ -58,6 +58,7 @@
|
|
|
|
|
$name = html_sanitize($room->name);
|
|
|
|
|
$desc = html_sanitize($room->description);
|
|
|
|
|
$users = html_sanitize($room->active_users);
|
|
|
|
|
$users_cutoff = html_sanitize($room->format_user_cutoff_period());
|
|
|
|
|
$preview_link = html_sanitize($room->get_preview_url());
|
|
|
|
|
$join_link = html_sanitize($room->get_join_url());
|
|
|
|
|
$pubkey = html_sanitize($pubkey);
|
|
|
|
@ -70,15 +71,16 @@
|
|
|
|
|
data-hostname="<?=$hostname?>"
|
|
|
|
|
>
|
|
|
|
|
<td class="td_identifier" itemprop="identifier"><?=$id?></td>
|
|
|
|
|
<td class="td_language"><?=$language?></td>
|
|
|
|
|
<td class="td_language" title="Language flag for '<?=$name?>'"><?=$language?></td>
|
|
|
|
|
<td class="td_name"
|
|
|
|
|
title="Click here to preview '<?=$name?>'"
|
|
|
|
|
data-sort-by="<?=strtolower($name)?>"
|
|
|
|
|
itemprop="name"
|
|
|
|
|
>
|
|
|
|
|
<a
|
|
|
|
|
href="<?=$room->get_preview_url()?>"
|
|
|
|
|
href="<?=$preview_link?>"
|
|
|
|
|
target="_blank"
|
|
|
|
|
title="'<?=$room->name?>' preview"
|
|
|
|
|
title="'<?=$name?>' preview"
|
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
|
><?=
|
|
|
|
|
$name
|
|
|
|
@ -94,10 +96,24 @@
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="td_description" itemprop="description"><?=$desc?></td>
|
|
|
|
|
<td class="td_users"><?=$users?></td>
|
|
|
|
|
<td
|
|
|
|
|
class="td_description"
|
|
|
|
|
title="Description for '<?=$name?>':
|
|
|
|
|
|
|
|
|
|
<?=$desc?>"
|
|
|
|
|
itemprop="description"
|
|
|
|
|
><?=$desc?></td>
|
|
|
|
|
<td
|
|
|
|
|
class="td_users"
|
|
|
|
|
title="'<?=$name?>' has had <?=$users?> active users in the last <?=$users_cutoff?>."
|
|
|
|
|
><?=$users?></td>
|
|
|
|
|
<td class="td_preview" itemprop="url">
|
|
|
|
|
<a href="<?=$preview_link?>" target="_blank" rel="noopener noreferrer nofollow">
|
|
|
|
|
<a
|
|
|
|
|
href="<?=$preview_link?>"
|
|
|
|
|
title="Click here to preview '<?=$name?>'"
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noopener noreferrer nofollow"
|
|
|
|
|
>
|
|
|
|
|
<span class="protocol-indicator"></span>
|
|
|
|
|
</a>
|
|
|
|
|
</td>
|
|
|
|
@ -106,11 +122,12 @@
|
|
|
|
|
class="qr-code-icon"
|
|
|
|
|
src="qrcode-solid.svg"
|
|
|
|
|
alt="Pictogram of a QR code"
|
|
|
|
|
title="Click here to view the QR Code for '<?=$name?>'"
|
|
|
|
|
>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="td_server_icon"
|
|
|
|
|
data-sort-by="<?=$pubkey?>"
|
|
|
|
|
title="<?=$hostname?> (<?=$pubkey?>)"
|
|
|
|
|
title="Host: <?=$hostname?> (<?=$pubkey?>)"
|
|
|
|
|
item="image"
|
|
|
|
|
>
|
|
|
|
|
<div class="td_server_icon-circle" style="background-color: <?=$icon_color?>">
|
|
|
|
@ -121,7 +138,11 @@
|
|
|
|
|
<div class="join_url_container" data-url="<?=$join_link?>">
|
|
|
|
|
<a class="join_url show-from-w5" title="<?=$join_link?>"
|
|
|
|
|
><?=truncate($join_link, 32)?></a>
|
|
|
|
|
<a class="noscript" href="<?=$join_link?>" rel="external nofollow"
|
|
|
|
|
<a
|
|
|
|
|
class="noscript"
|
|
|
|
|
title="Copy this link to join '<?=$name?>'."
|
|
|
|
|
href="<?=$join_link?>"
|
|
|
|
|
rel="external nofollow"
|
|
|
|
|
>Copy link</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|