From d1913cbfc55e83052c82d24e750c34c66d9d9ab4 Mon Sep 17 00:00:00 2001 From: Botanic Date: Wed, 23 Oct 2013 18:35:44 -0700 Subject: [PATCH 1/5] fixed div in settings template --HG-- branch : rc-botanic-webdev --- .../tools/server/ryzom_ams/www/html/templates/settings.tpl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl index 599427946..4ea75af12 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl @@ -125,6 +125,10 @@ + + +
+

Ticket updates

@@ -132,6 +136,8 @@
+ +
From 81d1cf93fb7315ce3e2543236b8e456d719fc58c Mon Sep 17 00:00:00 2001 From: Botanic Date: Wed, 23 Oct 2013 23:58:34 -0700 Subject: [PATCH 2/5] added option for assigned and unassigned ie "both" --HG-- branch : rc-botanic-webdev --- .../ams_lib/autoload/ticket_queue.php | 27 ++++++++++++++----- .../www/html/templates/show_queue.tpl | 21 ++++++++------- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_queue.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_queue.php index e72f1024d..03b2d6729 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_queue.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_queue.php @@ -84,14 +84,18 @@ class Ticket_Queue{ if($who == "user"){ $selectfrom = "SELECT * FROM `ticket` t LEFT JOIN `assigned` a ON t.TId = a.Ticket LEFT JOIN `ticket_user` tu ON tu.TUserId = a.User"; - if ($how == "assigned"){ + if ($how == "both"){ + $assign = ""; + }else if ($how == "assigned"){ $assign = "tu.TUserId = :id" ; }else if ($how == "not_assigned"){ $assign = "(tu.TUserId != :id OR a.Ticket IS NULL)"; } }else if ($who == "support_group"){ $selectfrom = "SELECT * FROM `ticket` t LEFT JOIN `assigned` a ON t.TId = a.Ticket LEFT JOIN `ticket_user` tu ON tu.TUserId = a.User LEFT JOIN `forwarded` f ON t.TId = f.Ticket"; - if ($how == "assigned"){ + if ($how == "both"){ + $assign = ""; + }else if ($how == "assigned"){ $assign = "f.Group = :id"; }else if ($how == "not_assigned"){ $assign = "(f.Group != :id OR f.Ticket IS NULL)" ; @@ -101,23 +105,34 @@ class Ticket_Queue{ if ($what == "waiting_for_support"){ $status = "t.Status = 1"; - }else if ($what == "waiting_for_user"){ + }else if ($what == "waiting_for_users"){ $status = "t.Status = 0"; }else if ($what == "closed"){ $status = "t.Status = 3"; } - $query = $selectfrom ." WHERE " . $assign; - if(isset($status)){ - $query = $query . " AND " . $status; + if ($assign == "") { + $query = $selectfrom; + if(isset($status)){ + $query = $query . " WHERE " . $status; + } + } else { + $query = $selectfrom ." WHERE " . $assign; + if(isset($status)){ + $query = $query . " AND " . $status; + } } + + if($who == "user"){ $params = array('id' => $userid); }else if ($who == "support_group"){ $params = array('id' => $groupid); } + $this->query = $query; $this->params = $params; + //print_r($this); } diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_queue.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_queue.tpl index 5c8c9c31a..c47227719 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_queue.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_queue.tpl @@ -16,29 +16,30 @@ Show tickets to - + - + {foreach from=$grouplist item=group} - + {/foreach} From 632a6f292937a92a4d626b87ed352262f66c2ac8 Mon Sep 17 00:00:00 2001 From: Botanic Date: Thu, 24 Oct 2013 01:25:05 -0700 Subject: [PATCH 4/5] fixed missing
--HG-- branch : rc-botanic-webdev --- .../server/ryzom_ams/www/html/templates/show_sgroup.tpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_sgroup.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_sgroup.tpl index 921b0edd1..e55d1b034 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_sgroup.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_sgroup.tpl @@ -95,6 +95,9 @@
+ + +

Modify Email Settings

@@ -172,7 +175,8 @@
-
+ + {/if} From 04619a39a9967e3657038f655c299e24923f70b0 Mon Sep 17 00:00:00 2001 From: Botanic Date: Thu, 24 Oct 2013 02:21:43 -0700 Subject: [PATCH 5/5] made users a dropdown for adding users to group --HG-- branch : rc-botanic-webdev --- .../server/ryzom_ams/www/html/inc/show_sgroup.php | 10 ++++++++++ .../ryzom_ams/www/html/templates/show_sgroup.tpl | 8 +++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_sgroup.php b/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_sgroup.php index 76dbe7b18..b35802551 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_sgroup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_sgroup.php @@ -47,6 +47,16 @@ function show_sgroup(){ } global $INGAME_WEBPATH; $result['ingame_webpath'] = $INGAME_WEBPATH; + $result['teamlist'] = Gui_Elements::make_table(Ticket_User::getModsAndAdmins(), Array("getTUserId","getExternId"), Array("tUserId","externId")); + $i = 0; + foreach( $result['teamlist'] as $member){ + $web_teammember = new Webusers($member['externId']); + if (!In_Support_Group::userExistsInSGroup($member['externId'], $result['target_id'])) { + $result['users'][$i]['name'] = $web_teammember->getUsername(); + } + $i++; + } + return $result; diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_sgroup.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_sgroup.tpl index e55d1b034..061731eab 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_sgroup.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_sgroup.tpl @@ -54,9 +54,11 @@
-
- -
+