diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2018-05-18 00:21:39 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2018-05-18 00:21:39 +0300 |
commit | 99d9befb629c97f7c778c8a9ddfb9d0060d54de9 (patch) | |
tree | f1f8bb8cd7b15761e9acd59f916117d3e680bd35 /indra/newview | |
parent | b29c7173c68707c7173c5bc26e54047e8f751c15 (diff) |
MAINT-8524 Estate Access Management - Viewer side changes for the "Banned" list
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 28 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_region_access.xml | 36 |
2 files changed, 53 insertions, 11 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 1d7c13109d..64e621d4cc 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -3939,8 +3939,32 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url) banned_agent_name_list->deleteAllItems(); for (LLSD::array_const_iterator it = result["BannedAgents"].beginArray(); it != result["BannedAgents"].endArray(); ++it) { - LLUUID id = (*it)["id"].asUUID(); - banned_agent_name_list->addNameItem(id); + LLSD item; + item["id"] = (*it)["id"].asUUID(); + LLSD& columns = item["columns"]; + + columns[0]["column"] = "name"; // to be populated later + + columns[1]["column"] = "last_login_date"; + columns[1]["value"] = (*it)["last_login_date"].asString().substr(0, 16); // cut the seconds + + std::string ban_date = (*it)["ban_date"].asString(); + columns[2]["column"] = "ban_date"; + columns[2]["value"] = ban_date[0] != '0' ? ban_date.substr(0, 16) : LLTrans::getString("na"); // server returns the "0000-00-00 00:00:00" date in case it doesn't know it + + columns[3]["column"] = "bannedby"; + LLUUID banning_id = (*it)["banning_id"].asUUID(); + LLAvatarName av_name; + if (banning_id.isNull()) + { + columns[3]["value"] = LLTrans::getString("na"); + } + else if (LLAvatarNameCache::get(banning_id, &av_name)) + { + columns[3]["value"] = av_name.getCompleteName(); //TODO: fetch the name if it wasn't cached + } + + banned_agent_name_list->addElement(item); } banned_agent_name_list->sortByName(TRUE); } diff --git a/indra/newview/skins/default/xui/en/panel_region_access.xml b/indra/newview/skins/default/xui/en/panel_region_access.xml index abadd7aa2d..7f6df426de 100644 --- a/indra/newview/skins/default/xui/en/panel_region_access.xml +++ b/indra/newview/skins/default/xui/en/panel_region_access.xml @@ -260,15 +260,33 @@ left="10" top_pad="-5" width="498" /> - <name_list - follows="left|top" - height="400" - layout="topleft" - left_delta="0" - multi_select="true" - name="banned_avatar_name_list" - top_delta="0" - width="498" /> + <name_list + draw_heading="true" + follows="left|top" + height="400" + layout="topleft" + left_delta="0" + multi_select="true" + name="banned_avatar_name_list" + top_delta="0" + width="498"> + <columns + label="Name" + name="name" + width="140" /> + <columns + label="Last login date" + name="last_login_date" + width="100" /> + <columns + label="Date banned" + name="ban_date" + width="100" /> + <columns + label="Banned by" + name="bannedby" + width="140" /> + </name_list> <!-- Always banned buttons --> <button follows="left|top" |