support: Show the first human user in realm search result.

This commit is contained in:
Vishnu KS 2021-04-16 23:47:48 +05:30 committed by Tim Abbott
parent e72dea1de6
commit ab771e4b19
3 changed files with 20 additions and 1 deletions

View File

@ -618,8 +618,11 @@ class TestSupportEndpoint(ZulipTestCase):
def check_zulip_realm_query_result(result: HttpResponse) -> None:
zulip_realm = get_realm("zulip")
first_human_user = zulip_realm.get_first_human_user()
assert first_human_user is not None
self.assert_in_success_response(
[
f"<b>First human user</b>: {first_human_user.delivery_email}\n",
f'<input type="hidden" name="realm_id" value="{zulip_realm.id}"',
"Zulip Dev</h3>",
'<option value="1" selected>Self hosted</option>',

View File

@ -69,6 +69,11 @@ tr.admin td:first-child {
top: -2px;
}
.support-realm-status-form {
position: relative;
top: 20px;
}
.support-discount-form {
position: relative;
top: -50px;

View File

@ -19,7 +19,18 @@
<i class="fa fa-copy"></i>
</a>
{% endif %}
<form method="POST">
<br>
{% set first_human_user = realm.get_first_human_user() %}
{% if first_human_user %}
<b>First human user</b>: {{ first_human_user.delivery_email }}
<a title="Copy emails" class="copy-button" data-copytext="{{ first_human_user.delivery_email }}">
<i class="fa fa-copy"></i>
</a>
{% else %}
<b>First human user</b>:
{% endif %}
<form method="POST" class="support-realm-status-form">
<b>Status</b>:<br>
{{ csrf_input }}
<input type="hidden" name="realm_id" value="{{ realm.id }}" />