summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterregioninfo.cpp28
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_access.xml36
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"