diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini index f8f32b5e2..ddda98203 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini @@ -30,6 +30,7 @@ invalid_sgroup = "Invalid support group!" ticket_not_existing = "That's an invalid ticket" success_forwarded = "The ticket was forwarded successfully!" public_sgroup = "Public" +not_assigned = "None" [show_user] diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini index 87d47245a..b8f145abe 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini @@ -30,6 +30,7 @@ invalid_sgroup = "Invalide support group!" ticket_not_existing = "c'est un billet invalide" success_forwarded = "ce billet est renvoyee bien!" public_sgroup = "Publique" +not_assigned = "Ne rien" [show_user] diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket.php b/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket.php index 03a7036e7..dee370655 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket.php @@ -4,6 +4,7 @@ function show_ticket(){ //if logged in if(WebUsers::isLoggedIn() && isset($_GET['id'])){ + $result['user_id'] = $_SESSION['ticket_user']->getTUserId(); $result['ticket_id'] = filter_var($_GET['id'], FILTER_SANITIZE_NUMBER_INT); $target_ticket = new Ticket(); $target_ticket->load_With_TId($result['ticket_id']); @@ -14,13 +15,21 @@ function show_ticket(){ case "forward": $ticket_id = filter_var($_POST['ticket_id'], FILTER_SANITIZE_NUMBER_INT); $group_id = filter_var($_POST['group'], FILTER_SANITIZE_NUMBER_INT); - $result['ACTION_RESULT'] = Ticket::forwardTicket($_SESSION['ticket_user']->getTUserId(), $ticket_id, $group_id); + $result['ACTION_RESULT'] = Ticket::forwardTicket($result['user_id'], $ticket_id, $group_id); break; + case "assignTicket": + $ticket_id = filter_var($_POST['ticket_id'], FILTER_SANITIZE_NUMBER_INT); + $result['ACTION_RESULT'] = Ticket::assignTicket($result['user_id'] , $ticket_id); + break; + case "unAssignTicket": + $ticket_id = filter_var($_POST['ticket_id'], FILTER_SANITIZE_NUMBER_INT); + $result['ACTION_RESULT'] = Ticket::unAssignTicket($result['user_id'], $ticket_id); + break; + } } } - if(($target_ticket->getAuthor() == $_SESSION['ticket_user']->getTUserId()) || Ticket_User::isMod($_SESSION['ticket_user'] )){ $show_as_admin = false; @@ -41,6 +50,8 @@ function show_ticket(){ $result['ticket_statustext'] = $entire_ticket['ticket_obj']->getStatusText(); $result['ticket_lastupdate'] = Gui_Elements::time_elapsed_string(Ticket::getLatestReply($result['ticket_id'])->getTimestamp()); $result['ticket_category'] = $entire_ticket['ticket_obj']->getCategoryName(); + $result['ticket_assignedToText'] = WebUsers::getUsername(Assigned::getUserAssignedToTicket($result['ticket_tId'])); + $result['ticket_assignedTo'] = Assigned::getUserAssignedToTicket($result['ticket_tId']); $result['ticket_replies'] = Gui_Elements::make_table($entire_ticket['reply_array'], Array("getTReplyId","getContent()->getContent","getTimestamp","getAuthor()->getExternId","getAuthor()->getPermission","getHidden"), Array("tReplyId","replyContent","timestamp","authorExtern","permission","hidden")); $i = 0; foreach( $result['ticket_replies'] as $reply){ diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_ticket.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_ticket.tpl index b1cdc78ad..b09f6fd4d 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_ticket.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_ticket.tpl @@ -32,7 +32,12 @@ {/if} - + +