user info popover: Add user type/role in user information popover.

Add user role-- "Administrator", "Member", "Bot" or "Guest"
under 'Local time' in user information popover.

Fixes part of #10754
This commit is contained in:
Yashashvi Dave
2018-11-03 00:15:32 +05:30
committed by Tim Abbott
parent 614624d232
commit 54dd7f0a43
3 changed files with 4 additions and 0 deletions

View File

@@ -145,6 +145,7 @@ run_test('sender_hover', () => {
user_email: 'alice@example.com',
user_id: 42,
user_time: undefined,
user_type: i18n.t('Member'),
presence_status: 'offline',
user_last_seen_time_status: 'translated: More than 2 weeks ago',
pm_with_uri: '#narrow/pm-with/42-alice',

View File

@@ -129,6 +129,7 @@ function render_user_info_popover(user, popover_element, is_sender_popover, priv
user_id: user.user_id,
user_last_seen_time_status: user_last_seen_time_status(user.user_id),
user_time: people.get_user_time(user.user_id),
user_type: people.get_user_type(user.user_id),
};
popover_element.popover({

View File

@@ -27,6 +27,8 @@
{{#if user_time}}
<li>{{ user_time }} {{#tr this}}Local time{{/tr}}</li>
{{/if}}
<li>{{ user_type }}</li>
</div>
<hr />
{{#if show_user_profile}}