2022-01-22 00:45:11 +01:00
|
|
|
<div class="micromodal" id="user-profile-modal" data-user-id="{{user_id}}" aria-hidden="true">
|
2022-11-11 08:10:56 +01:00
|
|
|
<div class="modal__overlay" tabindex="-1">
|
2022-10-20 20:14:36 +02:00
|
|
|
<div class="modal__container new-style" role="dialog" aria-modal="true" aria-labelledby="dialog_title">
|
2022-10-14 00:34:57 +02:00
|
|
|
<div class="modal__header">
|
2023-04-18 00:55:20 +02:00
|
|
|
{{#unless is_bot}}
|
2022-11-09 20:53:11 +01:00
|
|
|
<div class="tippy-zulip-tooltip" data-tippy-content="{{last_seen}}">
|
|
|
|
<span class="{{user_circle_class}} user_circle user_profile_presence"></span>
|
|
|
|
</div>
|
2023-04-18 00:55:20 +02:00
|
|
|
{{/unless}}
|
2023-01-27 07:18:43 +01:00
|
|
|
<h1 class="modal__title user_profile_name_heading" id="name">
|
|
|
|
<span class="user_profile_name">{{full_name}}</span>
|
2022-08-24 13:46:25 +02:00
|
|
|
{{#if is_bot}}
|
|
|
|
<i class="zulip-icon zulip-icon-bot" aria-hidden="true"></i>
|
|
|
|
{{/if}}
|
2021-07-22 17:50:59 +02:00
|
|
|
{{#if is_me}}
|
2023-02-11 11:06:47 +01:00
|
|
|
<a href="/#settings/profile" class="user_profile_edit_button">
|
2023-03-08 09:09:52 +01:00
|
|
|
<i class="fa fa-edit" id="user_profile_edit_button_icon" aria-hidden="true"></i>
|
2021-07-22 17:50:59 +02:00
|
|
|
</a>
|
2021-06-03 09:36:43 +02:00
|
|
|
{{/if}}
|
2022-10-14 00:34:57 +02:00
|
|
|
</h1>
|
|
|
|
<button class="modal__close" aria-label="{{t 'Close modal' }}" data-micromodal-close></button>
|
|
|
|
</div>
|
|
|
|
<div id="tab-toggle" class="center"></div>
|
|
|
|
<main class="modal__body" id="body" data-simplebar data-simplebar-auto-hide="false">
|
2021-07-22 17:50:59 +02:00
|
|
|
<div class="tab-data">
|
|
|
|
<div class="tabcontent active" id="profile-tab">
|
2022-06-05 16:37:04 +02:00
|
|
|
<div class="top">
|
|
|
|
<div class="col-wrap col-left">
|
|
|
|
<div id="default-section">
|
2021-10-26 15:43:39 +02:00
|
|
|
{{#if email}}
|
2022-06-05 16:37:04 +02:00
|
|
|
<div id="email" class="default-field">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "Email" }}</div>
|
2022-06-05 16:37:04 +02:00
|
|
|
<div class="value">{{email}}</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
<div id="user-id" class="default-field">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "User ID" }}</div>
|
2022-06-05 16:37:04 +02:00
|
|
|
<div class="value">{{user_id}}</div>
|
|
|
|
</div>
|
|
|
|
<div id="user-type" class="default-field">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "Role" }}</div>
|
2022-08-24 13:46:25 +02:00
|
|
|
{{#if is_bot}}
|
|
|
|
{{#if is_system_bot}}
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="value">{{t "System bot" }}</div>
|
2022-08-24 13:46:25 +02:00
|
|
|
{{else}}
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="value">{{t "Bot" }}</div>
|
2022-08-24 13:46:25 +02:00
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
|
|
|
<div class="value">{{user_type}}</div>
|
|
|
|
{{/if}}
|
2022-06-05 16:37:04 +02:00
|
|
|
</div>
|
|
|
|
<div id="date-joined" class="default-field">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "Joined" }}</div>
|
2022-06-05 16:37:04 +02:00
|
|
|
<div class="value">{{date_joined}}</div>
|
|
|
|
</div>
|
|
|
|
{{#if user_time}}
|
|
|
|
<div class="default-field">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "Local time" }}</div>
|
2022-06-05 16:37:04 +02:00
|
|
|
<div class="value">{{user_time}}</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2022-06-05 14:12:19 +02:00
|
|
|
</div>
|
2022-06-05 16:37:04 +02:00
|
|
|
</div>
|
|
|
|
<div class="col-wrap col-right">
|
|
|
|
<div id="avatar" {{#if user_is_guest}} class="guest-avatar" {{/if}}
|
|
|
|
style="background-image: url('{{user_avatar}}');">
|
2022-06-05 14:12:19 +02:00
|
|
|
</div>
|
2022-03-10 14:43:17 +01:00
|
|
|
</div>
|
2022-06-05 16:37:04 +02:00
|
|
|
</div>
|
|
|
|
<div class="bottom">
|
2022-06-05 14:12:19 +02:00
|
|
|
<div id="content">
|
2022-08-24 13:46:25 +02:00
|
|
|
{{#if is_bot}}
|
|
|
|
<div class="field-section">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "Bot type" }}</div>
|
2022-08-24 13:46:25 +02:00
|
|
|
<div class="bot_info_value">{{bot_type}}</div>
|
|
|
|
</div>
|
|
|
|
{{#if bot_owner}}
|
|
|
|
<div class="field-section bot_owner_user_field" data-field-id="{{bot_owner.user_id}}">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "Owner" }}</div>
|
2022-08-24 13:46:25 +02:00
|
|
|
<div class="pill-container not-editable">
|
|
|
|
<div class="input" contenteditable="false" style="display: none;"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2023-02-21 13:18:57 +01:00
|
|
|
{{> user_custom_profile_fields profile_fields=profile_data}}
|
2022-08-24 13:46:25 +02:00
|
|
|
{{/if}}
|
2021-06-03 09:36:43 +02:00
|
|
|
</div>
|
2021-07-22 17:50:59 +02:00
|
|
|
</div>
|
2021-06-03 09:36:43 +02:00
|
|
|
</div>
|
|
|
|
|
2021-07-22 17:50:59 +02:00
|
|
|
<div class="tabcontent" id="user-profile-streams-tab">
|
2023-09-08 19:37:58 +02:00
|
|
|
<div class="alert stream_list_info"></div>
|
|
|
|
{{#if show_user_subscribe_widget}}
|
|
|
|
<div class="header-section">
|
2023-09-08 22:46:01 +02:00
|
|
|
<h3 class="stream-tab-element-header">{{t 'Subscribe {full_name} to streams'}}</h3>
|
2023-09-08 19:37:58 +02:00
|
|
|
</div>
|
|
|
|
{{> user_profile_subscribe_widget}}
|
|
|
|
{{/if}}
|
2021-07-22 17:50:59 +02:00
|
|
|
<div class="stream-list-top-section">
|
|
|
|
<div class="header-section">
|
2023-09-08 22:46:01 +02:00
|
|
|
<h3 class="stream-tab-element-header">{{t 'Subscribed streams' }}</h3>
|
2021-07-22 17:50:59 +02:00
|
|
|
</div>
|
2023-03-27 10:24:27 +02:00
|
|
|
<input type="text" class="stream-search modal_text_input" placeholder="{{t 'Filter streams' }}" />
|
2021-07-22 17:50:59 +02:00
|
|
|
<button type="button" class="clear_search_button" id="clear_stream_search">
|
|
|
|
<i class="fa fa-remove" aria-hidden="true"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="subscription-stream-list">
|
|
|
|
<table class="user-stream-list" data-empty="{{t 'No stream subscriptions.'}}"></table>
|
|
|
|
</div>
|
2021-06-30 18:47:04 +02:00
|
|
|
</div>
|
2021-06-23 09:55:13 +02:00
|
|
|
|
2021-07-22 17:50:59 +02:00
|
|
|
<div class="tabcontent" id="user-profile-groups-tab">
|
|
|
|
<div class="subscription-group-list">
|
|
|
|
<table class="user-group-list" data-empty="{{t 'No user group subscriptions.'}}"></table>
|
|
|
|
</div>
|
|
|
|
</div>
|
settings_users: Migrate manage user modal to full profile modal.
This commit migrates the "manage user" modal to the "Full Profile"
modal. Refactored the show_edit_user_info_modal function since
earlier, we used to have a separate "Manage User" modal.
Consequently, we checked if we were coming from the
user_info_popover and then built the dialog widget accordingly.
However, with this new change, we no longer need to build the
dialog widget. Therefore, removed that part and now just pass
the container of the 'user profile modal' to get the content.
Previously, for deactivation, we used to have a separate dialog
widget. But now, since we have a dedicated function to handle
this case, refactored the deactivation code to use the
'confirm_deactivation' function.
Additionally, created two new functions to handle the loading
spinner. Since we will need these functions in the future for
the "Manage Bot" modal, we marked them as exported.
"Since we do not want to show the 'Manage User' tab to the user
looking at their own profile, in the 'can_manage_user' function
that we use to render the 'Manage User' tab, we check if the user
profile popover belongs to the same user. If it does, we set it to
'false' instead of 'true,' ensuring that the 'Manage User' tab is
not visible.
Added a new tab in the user profile modal 'manage user'.
Fixes: #21806
2023-09-09 12:42:04 +02:00
|
|
|
<div class="tabcontent" id="manage-profile-tab"></div>
|
2021-06-23 09:55:13 +02:00
|
|
|
</div>
|
2021-07-22 17:50:59 +02:00
|
|
|
</main>
|
2018-04-23 20:41:35 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|