mirror of
https://github.com/itflow-org/itflow
synced 2026-03-21 21:15:38 +00:00
Add eye icon for people viewing tickets
This commit is contained in:
4
ajax.php
4
ajax.php
@@ -221,10 +221,10 @@ if (isset($_GET['ticket_query_views'])) {
|
|||||||
$users = array_unique($users);
|
$users = array_unique($users);
|
||||||
if (count($users) > 1) {
|
if (count($users) > 1) {
|
||||||
// Multiple viewers
|
// Multiple viewers
|
||||||
$response['message'] = nullable_htmlentities(implode(", ", $users) . " are viewing this ticket.");
|
$response['message'] = "<i class='fas fa-fw fa-eye mr-2'></i>" . nullable_htmlentities(implode(", ", $users) . " are viewing this ticket.");
|
||||||
} else {
|
} else {
|
||||||
// Single viewer
|
// Single viewer
|
||||||
$response['message'] = nullable_htmlentities(implode("", $users) . " is viewing this ticket.");
|
$response['message'] = "<i class='fas fa-fw fa-eye mr-2'></i>" . nullable_htmlentities(implode("", $users) . " is viewing this ticket.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// No viewers
|
// No viewers
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ function ticket_collision_detection() {
|
|||||||
function(data) {
|
function(data) {
|
||||||
//If we get a response from ajax.php, parse it as JSON
|
//If we get a response from ajax.php, parse it as JSON
|
||||||
const ticket_view_data = JSON.parse(data);
|
const ticket_view_data = JSON.parse(data);
|
||||||
document.getElementById("ticket_collision_viewing").innerText = ticket_view_data.message;
|
document.getElementById("ticket_collision_viewing").innerHTML = ticket_view_data.message;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user